diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-03-16 17:02:59 +0100 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-03-16 17:02:59 +0100 |
commit | c89116edfc5dee938c19db6a497f99a135a35ab8 (patch) | |
tree | 66b27c244c8c620933f9e8e25bdc23f4a4cab27f /flake.nix | |
parent | ea2f56ce2befa0534907915ca5f7585bbbbaa9c3 (diff) | |
parent | 41be4192985f46bfe7de3595a5529571ea2b21ba (diff) | |
download | galier-c89116edfc5dee938c19db6a497f99a135a35ab8.tar.gz galier-c89116edfc5dee938c19db6a497f99a135a35ab8.zip |
Merge branch 'master' of github.com:19pdh/galier
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/flake.nix b/flake.nix index 4958116..09d5429 100644 --- a/flake.nix +++ b/flake.nix @@ -1,25 +1,32 @@ { - description = "Yet another photo gallery generator."; + description = "Yet another photo and video gallery generator."; outputs = { self, nixpkgs }: { packages.x86_64-linux.gal = with import nixpkgs { system = "x86_64-linux"; }; - stdenv.mkDerivation { - pname = "gal"; - version = "0.2"; + let + pname = "galier"; + version = "0.1"; + install = writeScriptBin "install" '' + ${toybox}/bin/mkdir -p $out/bin $out/share/galier + ${toybox}/bin/cp $src/galier $out/bin + ${toybox}/bin/cp $src/style.css $out/share/galier - src = self; - - installPhase = '' - mkdir -p $out/bin $out/share/gal - cp gal $out/bin - cp style.css $out/share/gal - - sed -i 's:convert:${imagemagick}/bin/convert:g' $out/bin/gal - sed -i 's:cwebp:${libwebp}/bin/cwebp:g' $out/bin/gal - sed -i "s:cp style.css:cp $out/share/gal/style.css:g" $out/bin/gal + ${toybox}/bin/sed -i 's:convert:${imagemagick}/bin/convert:g' $out/bin/galier + ${toybox}/bin/sed -i 's:cwebp:${libwebp}/bin/cwebp:g' $out/bin/galier + ${toybox}/bin/sed -i 's:ffmpeg:${ffmpeg}/bin/ffmpeg:g' $out/bin/galier + ${toybox}/bin/sed -i 's:ffprobe:${ffmpeg}/bin/ffprobe:g' $out/bin/galier + ${toybox}/bin/sed -i "s:cp style.css:cp $out/share/galier/style.css:g" $out/bin/galier ''; + + in + derivation { + name = "${pname}-${version}"; + builder = "${bash}/bin/bash"; + args = [ "${install}/bin/install" ]; + src = self; + system = "x86_64-linux"; }; defaultPackage.x86_64-linux = self.packages.x86_64-linux.gal; |