From 7e5bd85b131834fbde8e079bbab4d1cbc98de4e9 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 7 Aug 2023 11:28:54 +0100 Subject: [PATCH] nix --- flake.lock | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 22 ++++++++++++++ result | 1 + 3 files changed, 107 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 120000 result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..bcb0330 --- /dev/null +++ b/flake.lock @@ -0,0 +1,84 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1690933134, + "narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1691368598, + "narHash": "sha256-ia7li22keBBbj02tEdqjVeLtc7ZlSBuhUk+7XTUFr14=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5a8e9243812ba528000995b294292d3b5e120947", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1690881714, + "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9e1960bc196baf6881340d53dccb203a951745a2", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "gitignore": "gitignore", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..54927c6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + description = "bech32cli"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + gitignore = { + url = "github:hercules-ci/gitignore.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = inputs@{ flake-parts, gitignore, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + perSystem = { config, self', inputs', pkgs, system, ... }: { + packages.default = pkgs.buildGoModule { + vendorSha256 = "sha256-oS/87ih8C2ScQkz/iYOrjDiXJ7vN6CwT/GI8DjzeFNg="; + name = "bech32cli"; + src = gitignore.lib.gitignoreSource ./.; + }; + }; + }; +} diff --git a/result b/result new file mode 120000 index 0000000..f125245 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/ya962xwkis7ibyx1jqr634vka0jp3v1w-bech32cli \ No newline at end of file