From 8c399a849401c45fce0a1e06c42bbd745b1934b5 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Mon, 23 Aug 2021 19:01:50 +0200 Subject: [PATCH] add flake.nix --- flake.lock | 40 ++++++++++++++++++++++++++++++++++++++++ flake.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 69 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..0e68d29 --- /dev/null +++ b/flake.lock @@ -0,0 +1,40 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1629481132, + "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "997f7efcb746a9c140ce1f13c72263189225f482", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1628077112, + "narHash": "sha256-ehfkGNBdq0GFbezcXZP4OPcik+k4Lm7mF8NUKJlq6Ho=", + "path": "/nix/store/gy0x00sjl3lczh2h6akhhcfyp263nmy5-source", + "rev": "465daf79b4a23d6e47d2efddece7120da8800c63", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f2b2aac --- /dev/null +++ b/flake.nix @@ -0,0 +1,29 @@ +{ + description = "Socialize web page"; + + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + + # Package + packages.socialize = + pkgs.stdenv.mkDerivation { + name = "socialize"; + src = self; + installPhase = '' + install -m 444 -D index.html $out/index.html + install -m 444 -D favicon.png $out/favicon.png + ''; + }; + defaultPackage = self.packages.${system}.socialize; + } + + ); +}