blob: 93737413bd038978068205d690dd8fa3cf3e1c2f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{
pkgs ? import <nixpkgs> { },
}:
let
inherit (pkgs) lib;
buildNimSbom = pkgs.callPackage ./build-nim-sbom.nix { };
nix' = pkgs.nixVersions.latest.overrideAttrs (_: {
version = "2024-08-23";
src = pkgs.fetchFromGitHub {
owner = "nixos";
repo = "nix";
rev = "85f1aa6b3df5c5fcc924a74e2a9cc8acea9ba0e1";
hash = "sha256-3+UgAktTtkGUNpxMxr+q+R+z3r026L3PwJzG6RD2IXM=";
};
});
in
buildNimSbom (finalAttrs: {
outputs = [
"out"
"cfg"
];
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ nix' ];
src = if lib.inNixShell then null else lib.cleanSource ./.;
postInstall = ''
mkdir $cfg
export mainProgram="$out/bin/nix-actor"
substituteAll service.pr.in $cfg/service.pr
'';
}) ./sbom.json
|