diff --git a/flake.nix b/flake.nix index a503aef..ab044a1 100644 --- a/flake.nix +++ b/flake.nix @@ -41,27 +41,7 @@ in { packages = forEachSupportedSystem ({ pkgs, cranePkgs, ... }: rec { - magic-nix-cache = (pkgs.pkgsStatic.callPackage ./package.nix { - rustPlatform = pkgs.pkgsStatic.rustPackages_1_70.rustPlatform; - nix = pkgs.pkgsStatic.nix.overrideAttrs (old: { - patches = (old.patches or []) ++ [ ./nix.patch ]; - }); - }).overrideAttrs (old: { - nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ - pkgs.nukeReferences - ]; - - # Read by pkg_config crate (do some autodetection in build.rs?) - PKG_CONFIG_ALL_STATIC = "1"; - - "NIX_CFLAGS_LINK_${pkgs.pkgsStatic.stdenv.cc.suffixSalt}" = "-lc"; - RUSTFLAGS = "-C relocation-model=static"; - - postFixup = (old.postFixup or "") + '' - rm -f $out/nix-support/propagated-build-inputs - nuke-refs $out/bin/magic-nix-cache - ''; - }); + magic-nix-cache = pkgs.callPackage ./package.nix { }; #inherit (cranePkgs) magic-nix-cache; default = magic-nix-cache; }); diff --git a/package.nix b/package.nix index 0f22583..da3e544 100644 --- a/package.nix +++ b/package.nix @@ -38,4 +38,8 @@ in rustPlatform.buildRustPackage rec { # Recursive Nix is not stable yet doCheck = false; + + postFixup = '' + rm -f $out/nix-support/propagated-build-inputs + ''; }