From c07a209de3ebc10922c3f08ccf7aab5b08fd3324 Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 24 Nov 2024 19:44:37 +0100 Subject: [PATCH] Add flake.nix --- .gitignore | 1 + flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 28 ++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fcfc4a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result* diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d98d6b8 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..97b32d3 --- /dev/null +++ b/flake.nix @@ -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; + }; + }; +}