Skip to content

Commit

Permalink
Fix non-determinism? Please
Browse files Browse the repository at this point in the history
  • Loading branch information
pedorich-n committed Jun 11, 2024
1 parent b7a88f4 commit 319ff8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

modrinth-pack = pkgs.callPackage ./nix/packwiz-modrinth.nix {
src = self;
hash = "sha256-ie0Igriqj77fmhcRyJtUxqJKAI+db1+dNF3QgyVi7P4=";
hash = "sha256-isQlN/V2tWn8nrQQE72CLDtwSwzKGbAbSNcWARlozvo=";
};

# Not used for anything right now
Expand Down
9 changes: 7 additions & 2 deletions nix/packwiz-modrinth.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
, lib
, stdenvNoCC
, packwiz
, strip-nondeterminism
}:
stdenvNoCC.mkDerivation (finalAttrs:
let
Expand All @@ -21,16 +22,20 @@ in

dontFixup = true;

buildInputs = [ packwiz ];
nativeBuildInputs = [ packwiz strip-nondeterminism ];

buildPhase = ''
runHook preBuild
# Github Ation fails with "failed to create cache directory: mkdir /homeless-shelter: permission denied" if this is not set
export HOME=$TMPDIR
result="$out/${resultName}"
mkdir -p $out
packwiz modrinth export --output "$out/${resultName}"
packwiz modrinth export --output "$result"
strip-nondeterminism --type zip "$result"
runHook postBuild
'';
Expand Down

0 comments on commit 319ff8d

Please sign in to comment.