1
0
mirror of https://github.com/nbd-wtf/satdress.git synced 2024-11-11 16:30:35 +00:00

Nix flake support

This commit is contained in:
Gregor Pogacnik 2022-01-18 20:06:04 +01:00 committed by fiatjaf
parent a204288679
commit e0f240a3d9
2 changed files with 76 additions and 0 deletions

42
flake.lock Normal file
View File

@ -0,0 +1,42 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1642530650,
"narHash": "sha256-AWO+GS6I1gEzTk1PFXuLhfBTIoSiKVZufnhb45U2aPw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d3a146c2ec9c1dae66d11d1cd45052e5a9fde9c5",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

34
flake.nix Normal file
View File

@ -0,0 +1,34 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
packages = flake-utils.lib.flattenTree {
satdress = pkgs.buildGoModule {
pname = "satdress";
version = "v0.5.0";
src = self;
vendorSha256 = "0xz93pmpvqg3wa9ixs7hkaqgmybnqgllf2991nrabkall1dckamh";
};
};
defaultPackage = packages.satdress;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [ go packages.satdress ];
shellHook = ''
echo "Dev shell ready"
'';
};
});
}