1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat: scanned script

This commit is contained in:
2021-05-13 21:34:16 +02:00
parent aac96c00bf
commit bdb9220df6
2 changed files with 8 additions and 0 deletions

View File

@@ -343,6 +343,13 @@ in rec {
esac
'';
# ref https://tex.stackexchange.com/a/502542
scanned = pkgs.writers.writeDashBin "scanned" ''
[ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1
${pkgs.imagemagick}/bin/convert -density 150 "$1" -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian "scanned-$1"
'';
nix-index-update = pkgs.writers.writeDashBin "nix-index-update" ''
mkdir -p $HOME/.cache/nix-index
tag=$(git -c 'versionsort.suffix=-' \