From ca9dc0c07dd4970fc8d7d1f45875e8cb0dd357a6 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Tue, 19 Jan 2021 18:55:46 +0100 Subject: Add flake --- flake.lock | 41 +++++++++++++++++++++++++++++++++++++++++ flake.nix | 24 ++++++++++++++++++++++++ 2 files changed, 65 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..849d8ed --- /dev/null +++ b/flake.lock @@ -0,0 +1,41 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1611078587, + "narHash": "sha256-QdDs3Vrso0YHOzWQqLFd6cfYWLC2lwc/IgujUNaCgK0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f14a087dd842d14e082967f1cb48c247bba68591", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nur": { + "locked": { + "lastModified": 1611073813, + "narHash": "sha256-hV6+riOEK4cCVmRKO8uF3kPzGUKHEm6aKXAQ47hIjWo=", + "owner": "nix-community", + "repo": "NUR", + "rev": "29120cf496abd0a996ad208caab271f89aa9d2b4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "nur": "nur" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9e576c3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "19 PDH Puszcza low-tech site"; + inputs.nur.url = github:nix-community/NUR; + + outputs = { self, nixpkgs, nur }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; overlays = [ nur.overlay ]; }; + in { + defaultPackage.${system} = self.packages.${system}.low-puszcza; + + packages.${system}.low-puszcza = pkgs.stdenv.mkDerivation { + name = "low-puszcza"; + src = self; + nativeBuildInputs = [ pkgs.zip pkgs.nur.repos.pn.saait ]; + + installPhase = '' + mkdir $out + cp -r output $out/ + ''; + }; + + }; +} -- cgit 1.4.1