mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-04 06:05:59 +00:00
Fix nix package for tools
This commit is contained in:
parent
98aa3423c1
commit
606a6756c8
17
nix/pkg.nix
17
nix/pkg.nix
@ -1,4 +1,4 @@
|
||||
cfg: {stdenv, fetchzip, file, curl, inotifyTools, fetchurl, jdk11, bash}:
|
||||
cfg: {stdenv, fetchzip, file, curl, inotifyTools, fetchurl, jdk11, bash, jq, sqlite}:
|
||||
let
|
||||
meta = with stdenv.lib; {
|
||||
description = "Docspell helps to organize and archive your paper documents.";
|
||||
@ -60,12 +60,19 @@ in
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src/consumedir.sh $out/bin/
|
||||
cp $src/ds.sh $out/bin/ds
|
||||
sed -i 's,CURL_CMD="curl",CURL_CMD="${curl}/bin/curl",g' $out/bin/consumedir.sh
|
||||
sed -i 's,CURL_CMD="curl",CURL_CMD="${curl}/bin/curl",g' $out/bin/ds
|
||||
sed -i 's,INOTIFY_CMD="inotifywait",INOTIFY_CMD="${inotifyTools}/bin/inotifywait",g' $out/bin/consumedir.sh
|
||||
sed -i 's,FILE_CMD="file",FILE_CMD="${file}/bin/file",g' $out/bin/ds
|
||||
|
||||
while read f; do
|
||||
target="ds-$(basename "$f" ".sh")"
|
||||
echo "Installing $f -> $target"
|
||||
cp "$f" "$out/bin/$target"
|
||||
sed -i 's,CURL_CMD="curl",CURL_CMD="${curl}/bin/curl",g' $out/bin/$target
|
||||
sed -i 's,INOTIFY_CMD="inotifywait",INOTIFY_CMD="${inotifyTools}/bin/inotifywait",g' $out/bin/$target
|
||||
sed -i 's,JQ_CMD="jq",JQ_CMD="${jq}/bin/jq",g' $out/bin/$target
|
||||
sed -i 's,SQLITE_CMD="sqlite3",SQLITE_CMD="${sqlite}/bin/sqlite3",g' $out/bin/$target
|
||||
done < <(find . -name "*.sh" -mindepth 2 -not -path "*webextension*")
|
||||
|
||||
chmod 755 $out/bin/*
|
||||
'';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user