Skip to content

Commit

Permalink
Nix flake: Make nix build work on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jchv committed Jun 23, 2024
1 parent 4b82a76 commit 9c35789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
let
inherit (pkgs) lib stdenv;
pkgs = nixpkgs.legacyPackages.${system};
deps = lib.optionals stdenv.isDarwin [ pkgs.macfuse-stubs ];
gitCommit = self.dirtyShortRev or self.rev or "";
in
{
packages = rec {
pangfiles = pkgs.buildGo122Module {
name = "pangfiles";
src = self;
buildInputs = deps;
vendorHash = pkgs.lib.fileContents ./go.mod.sri;
ldflags = [ "-X github.com/pangbox/pangfiles/version.GitCommit=${gitCommit}" ];
meta = {
Expand All @@ -35,7 +37,7 @@
pkgs.gotools
pkgs.go_1_22
pkgs.gnumake
] ++ lib.optional stdenv.isDarwin [ pkgs.macfuse-stubs ];
] ++ deps;
};
}
);
Expand Down
2 changes: 1 addition & 1 deletion go.mod.sri
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sha256-zyI17AewEtX0piLkE013ysm/gX01p15AligJcnd9vsg=
sha256-8vwkk+h0hFcn5rb8iubyXdTtIAYA0plt7nNtUF+CtRk=

0 comments on commit 9c35789

Please sign in to comment.