diff --git a/flake.nix b/flake.nix index c464b8f7c..b45502293 100644 --- a/flake.nix +++ b/flake.nix @@ -403,6 +403,23 @@ BINDIR=${placeholder "bin"}/bin ''; }; + nix-find-roots = prev.stdenv.mkDerivation { + name = "nix-find-roots-${version}"; + inherit version; + + src = "${self}/src/nix-find-roots"; + + CXXFLAGS = prev.lib.optionalString prev.stdenv.hostPlatform.isStatic "-static"; + + buildPhase = '' + $CXX $CXXFLAGS -std=c++17 nix-find-roots.cc -o nix-find-roots + ''; + + installPhase = '' + mkdir -p $out/bin + cp nix-find-roots $out/bin/ + ''; + }; }; in { @@ -560,6 +577,7 @@ packages = forAllSystems (system: { inherit (nixpkgsFor.${system}) nix; } // (nixpkgs.lib.optionalAttrs (builtins.elem system linux64BitSystems) { + inherit (nixpkgsFor.${system}.pkgsStatic) nix-find-roots; nix-static = let nixpkgs = nixpkgsFor.${system}.pkgsStatic; in with commonDeps nixpkgs; nixpkgs.stdenv.mkDerivation {