1{ lib
2, rustPlatform
3, fetchFromGitHub
4, pkg-config
5, openssl
6, stdenv
7, darwin
8}:
9
10rustPlatform.buildRustPackage {
11 pname = "gridlock";
12 version = "unstable-2023-03-03";
13
14 outputs = [ "out" "nyarr" ];
15
16 src = fetchFromGitHub {
17 owner = "lf-";
18 repo = "gridlock";
19 rev = "15261abdb179e1d7e752772bf9db132b3ee343ea";
20 hash = "sha256-rnPAEJH3TebBH6lqgVo7B+nNiArDIkGDnIZWcteFNEw=";
21 };
22
23 cargoHash = "sha256-EPs5vJ2RkVXKxrTRtbT/1FbvCT0KJtNuW2WKIUq7G0U=";
24
25 nativeBuildInputs = [
26 pkg-config
27 ];
28
29 buildInputs = [
30 openssl
31 ] ++ lib.optionals stdenv.isDarwin [
32 darwin.apple_sdk.frameworks.Security
33 ];
34
35 postInstall = ''
36 moveToOutput bin/nyarr $nyarr
37 '';
38
39 meta = with lib; {
40 description = "Nix compatible lockfile manager, without Nix";
41 homepage = "https://github.com/lf-/gridlock";
42 license = licenses.mit;
43 maintainers = with maintainers; [ figsoda ];
44 };
45}