Add pycdc

This commit is contained in:
bad 2021-12-04 14:36:05 +01:00
parent b7e9a9b356
commit 2b80fceac4
3 changed files with 37 additions and 4 deletions

View file

@ -44,11 +44,28 @@
"type": "indirect" "type": "indirect"
} }
}, },
"pycdc": {
"flake": false,
"locked": {
"lastModified": 1637645353,
"narHash": "sha256-iLf0pwmIF13/IS+vzpudT5O54Jj933pBZi0gbiz6Ebc=",
"owner": "zrax",
"repo": "pycdc",
"rev": "99b35a114a6fb84352ca92802c1a26fb8692a7b0",
"type": "github"
},
"original": {
"owner": "zrax",
"repo": "pycdc",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"jwt-tool": "jwt-tool", "jwt-tool": "jwt-tool",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"pycdc": "pycdc"
} }
} }
}, },

View file

@ -7,21 +7,29 @@
url = "github:MaeIsBad/jwt_tool"; url = "github:MaeIsBad/jwt_tool";
flake = false; flake = false;
}; };
pycdc = {
url = "github:zrax/pycdc";
flake = false;
};
}; };
outputs = { self, nixpkgs, flake-utils, jwt-tool }: outputs = { self, nixpkgs, flake-utils, jwt-tool, pycdc }:
flake-utils.lib.eachDefaultSystem flake-utils.lib.eachDefaultSystem
(system: (system:
let let
nixpkgs = import self.inputs.nixpkgs { system = "x86_64-linux"; }; nixpkgs = import self.inputs.nixpkgs { system = system; };
in in
rec { rec {
packages.jwt-tool = (import ./jwt-tool.nix { inherit nixpkgs jwt-tool; }); packages.jwt-tool = (import ./jwt-tool.nix { inherit nixpkgs jwt-tool; });
defaultPackage = packages.jwt-tool;
apps.jwt-tool = { apps.jwt-tool = {
type = "app"; type = "app";
program = "${packages.jwt-tool}/bin/jwt_tool"; program = "${packages.jwt-tool}/bin/jwt_tool";
}; };
packages.pycdc = (import ./pycdc.nix { inherit nixpkgs pycdc; });
apps.pycdc = {
type = "app";
program = "${packages.pycdc}/bin/pycdc";
};
} }
); );
} }

8
pycdc.nix Normal file
View file

@ -0,0 +1,8 @@
{ nixpkgs, pycdc }: with nixpkgs;
stdenv.mkDerivation {
pname = "pycdc";
src = pycdc.outPath;
version = pycdc.shortRev;
buildInputs = [ python ];
nativeBuildInputs = [ cmake ];
}