From 29599f529b9a1647bce623d72dd3e22ee0c743cc Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 5 Oct 2020 16:22:15 +0200 Subject: [PATCH] Add basic flake --- flake.lock | 25 +++++++++++++++++++++++++ flake.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4e92b89 --- /dev/null +++ b/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1601906239, + "narHash": "sha256-P1jBYbYeFswig/0FKbgh+BpVhh9iurD3m0T2ae4gdx8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c2bb4af48d26ed091e5674394bacbf8d488c7939", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..fe4d516 --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "Arion - use Docker Compose via Nix"; + + outputs = { self, nixpkgs }: + let + lib = import (nixpkgs + "/lib"); + systems = [ + "aarch64-linux" + "x86_64-darwin" + "x86_64-linux" + ]; + in { + + packages = lib.genAttrs systems (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + arion = import ./nix/arion.nix { inherit pkgs; }; + }); + + defaultPackage = lib.genAttrs systems (system: + self.packages.${system}.arion + ); + + }; +}