10 # runtime dependencies
11 , nix # for nix-prefetch-url
13 , git # for git ls-remote
17 runtimePath = lib.makeBinPath [ nix nix-prefetch-git git ];
18 sources = (builtins.fromJSON (builtins.readFile ./sources.json)).pins;
19 in rustPlatform.buildRustPackage rec {
21 version = src.version;
22 src = passthru.mkSource sources.npins;
24 cargoSha256 = "sha256-NDu4nl4Os7Mgal8gBHC6bsZ2Z+Fqt0PlGdLHiPd/8T4=";
26 buildInputs = lib.optional stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ]);
27 nativeBuildInputs = [ makeWrapper ];
29 # (Almost) all tests require internet
33 wrapProgram $out/bin/npins --prefix PATH : "${runtimePath}"
37 description = "Simple and convenient dependency pinning for Nix";
38 homepage = "https://github.com/andir/npins";
39 license = licenses.eupl12;
40 maintainers = with maintainers; [ piegames ];
43 passthru.mkSource = callPackage ./source.nix {};