Add flake.nix

This commit is contained in:
clerie 2024-11-24 19:44:37 +01:00
parent f600f4fe93
commit c07a209de3
3 changed files with 56 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
result*

27
flake.lock Normal file
View File

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

28
flake.nix Normal file
View File

@ -0,0 +1,28 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }: {
packages = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = import nixpkgs {
inherit system;
};
in rec {
scan-to-gpg = pkgs.buildGoModule {
pname = "scan-to-gpg";
version = "0.0.1";
src = ./.;
vendorHash = "sha256-SrsjcNtqQdE8Gekjn72JhCysfNmKJs7ju2BcKnOQf/U=";
};
default = scan-to-gpg;
});
hydraJobs = {
inherit (self)
packages;
};
};
}