From 01fc20da396c4e99b6e0f92105e76a7d40dfbc88 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 14 Jan 2021 18:40:19 +0100 Subject: Add flake.nix --- flake.lock | 25 +++++++++++++++++++++++++ flake.nix | 25 +++++++++++++++++++++++++ 2 files changed, 50 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..d2817ae --- /dev/null +++ b/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1610643619, + "narHash": "sha256-0WH+MR+7YnZf+AJOov8UJGKaTjz+HuP0T3WY8S2wtVg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "80badc893dca2fc5196a5664473b187d9e9cfca9", + "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..aec547c --- /dev/null +++ b/flake.nix @@ -0,0 +1,25 @@ +{ + description = "Yet another photo gallery generator."; + + outputs = { self, nixpkgs }: { + + packages.x86_64-linux.gal = + with import nixpkgs { system = "x86_64-linux"; }; + stdenv.mkDerivation { + pname = "gal"; + version = "0.1"; + + src = self; + + installPhase = '' + mkdir -p $out/bin + cp gal $out/bin + + sed -i 's:convert:${imagemagick}/bin/convert:g' $out/bin/gal + ''; + }; + + defaultPackage.x86_64-linux = self.packages.x86_64-linux.gal; + + }; +} -- cgit 1.4.1