File tree Expand file tree Collapse file tree 3 files changed +40
-14
lines changed Expand file tree Collapse file tree 3 files changed +40
-14
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,15 @@ Better [gal](https://github.com/19pdh/gal) - media gallery generator.
5
5
It supports images and videos
6
6
7
7
## Usage
8
+
9
+ ```
10
+ galier [SRC DIR] [OUTPUT DIR]
11
+ ```
12
+
13
+ ## Caching results
14
+
15
+ Since video transcoding is a cpu intensive task this script will check if file
16
+ exists in output folder. In order to regenerate video you need to remove/rename
17
+ file in its destination.
18
+
19
+ Other files (htmls, images) will always be overwritten.
Original file line number Diff line number Diff line change
1
+ ( import (
2
+ fetchTarball {
3
+ url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz" ;
4
+ sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2" ; }
5
+ ) {
6
+ src = ./. ;
7
+ } ) . defaultNix
Original file line number Diff line number Diff line change 1
1
{
2
- description = "Yet another photo gallery generator." ;
2
+ description = "Yet another photo and video gallery generator." ;
3
3
4
4
outputs = { self , nixpkgs } : {
5
5
6
6
packages . x86_64-linux . gal =
7
7
with import nixpkgs { system = "x86_64-linux" ; } ;
8
- stdenv . mkDerivation {
9
- pname = "gal" ;
10
- version = "0.2" ;
8
+ let
9
+ pname = "galier" ;
10
+ version = "0.1" ;
11
+ install = writeScriptBin "install" ''
12
+ ${ toybox } /bin/mkdir -p $out/bin $out/share/galier
13
+ ${ toybox } /bin/cp $src/galier $out/bin
14
+ ${ toybox } /bin/cp $src/style.css $out/share/galier
11
15
12
- src = self ;
13
-
14
- installPhase = ''
15
- mkdir -p $out/bin $out/share/gal
16
- cp gal $out/bin
17
- cp style.css $out/share/gal
18
-
19
- sed -i 's:convert:${ imagemagick } /bin/convert:g' $out/bin/gal
20
- sed -i 's:cwebp:${ libwebp } /bin/cwebp:g' $out/bin/gal
21
- sed -i "s:cp style.css:cp $out/share/gal/style.css:g" $out/bin/gal
16
+ ${ toybox } /bin/sed -i 's:convert:${ imagemagick } /bin/convert:g' $out/bin/galier
17
+ ${ toybox } /bin/sed -i 's:cwebp:${ libwebp } /bin/cwebp:g' $out/bin/galier
18
+ ${ toybox } /bin/sed -i 's:ffmpeg:${ ffmpeg } /bin/ffmpeg:g' $out/bin/galier
19
+ ${ toybox } /bin/sed -i 's:ffprobe:${ ffmpeg } /bin/ffprobe:g' $out/bin/galier
20
+ ${ toybox } /bin/sed -i "s:cp style.css:cp $out/share/galier/style.css:g" $out/bin/galier
22
21
'' ;
22
+
23
+ in
24
+ derivation {
25
+ name = "${ pname } -${ version } " ;
26
+ builder = "${ bash } /bin/bash" ;
27
+ args = [ "${ install } /bin/install" ] ;
28
+ src = self ;
29
+ system = "x86_64-linux" ;
23
30
} ;
24
31
25
32
defaultPackage . x86_64-linux = self . packages . x86_64-linux . gal ;
You can’t perform that action at this time.
0 commit comments