9 , nix # for nix-prefetch-url
11 , git # for git ls-remote
15 runtimePath = lib.makeBinPath [ nix nix-prefetch-git git ];
16 sources = (lib.importJSON ./sources.json).pins;
17 in rustPlatform.buildRustPackage rec {
19 version = src.version;
20 src = passthru.mkSource sources.npins;
22 cargoHash = "sha256-YwMypBl+P1ygf4zUbkZlq4zPrOzf+lPOz2FLg2/xI3k=";
24 buildInputs = lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]);
25 nativeBuildInputs = [ makeWrapper ];
27 # (Almost) all tests require internet
31 wrapProgram $out/bin/npins --prefix PATH : "${runtimePath}"
35 description = "Simple and convenient dependency pinning for Nix";
36 mainProgram = "npins";
37 homepage = "https://github.com/andir/npins";
38 license = licenses.eupl12;
39 maintainers = with maintainers; [ piegames ];
42 passthru.mkSource = callPackage ./source.nix {};