Skip to content

Commit

Permalink
Tried recursive nix
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed Feb 13, 2024
1 parent 164a313 commit 9ab2166
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
13 changes: 0 additions & 13 deletions nix-tools/static/project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,7 @@ let
};


# Fix compilation with newer ghc versions
apply-workaround-for-ghc94-and-above = { lib, config, ... }:
lib.mkIf (lib.versionAtLeast config.compiler.version "9.4") {
# lib:ghc is a bit annoying in that it comes with it's own build-type:Custom, and then tries
# to call out to all kinds of silly tools that GHC doesn't really provide.
# For this reason, we try to get away without re-installing lib:ghc for now.
reinstallableLibGhc = false;
};


apply-dontStrip-to-nix-tools = {
# This is stupid. We should be able to set dontStrip globally.
# The fact that we can't inherit is bullshit.
packages.nix-tools.components.exes = {
cabal-name.dontStrip = false;
cabal-to-nix.dontStrip = false;
Expand Down Expand Up @@ -79,7 +67,6 @@ let

modules = [
apply-hnix-patches
apply-workaround-for-ghc94-and-above
apply-dontStrip-to-nix-tools
add-static-libs-to-darwin
];
Expand Down
10 changes: 5 additions & 5 deletions nix-tools/static/zipped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ let
zippedToolsNoIfdFor = fragment-name:
let
stringifyInputs = inputs: map (x: "${x}") (builtins.attrValues inputs);

fragment-drv = "static-nix-tools-outputs.hydraJobs.${pkgs.hostPlatform.system}.zipped.${fragment-name}";
in
pkgs.runCommand "${pkgs.hostPlatform.system}-all-nix-tools" {
requiredSystemFeatures = [ "recursive-nix" ];
nativeBuildInputs =
[ pkgs.nix pkgs.gitMinimal ]
++ stringifyInputs inputs
++ stringifyInputs inputs.haskellNix.inputs;
# ++ stringifyInputs inputs.iohkNix.inputs;
} ''
export HOME=$(mktemp -d)
mkdir $out
cp $(nix --offline --extra-experimental-features "flakes nix-command" \
cp $(nix --offline --extra-experimental-features "flakes nix-command recursive-nix" \
build --accept-flake-config --no-link --print-out-paths \
--system ${pkgs.hostPlatform.system} \
${../.}#${fragment-name})/*.zip $out/
${../.}#${fragment-drv})/*.zip $out/
'';



zippedToolsForDarwin = makeZippedTools {
customPkgs = pkgs;
clearStripDebugFlags = true;
Expand Down

0 comments on commit 9ab2166

Please sign in to comment.