mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-11-03 18:00:11 +00:00 
			
		
		
		
	Fix nix package for tools
This commit is contained in:
		
							
								
								
									
										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
 | 
					let
 | 
				
			||||||
  meta = with stdenv.lib; {
 | 
					  meta = with stdenv.lib; {
 | 
				
			||||||
    description = "Docspell helps to organize and archive your paper documents.";
 | 
					    description = "Docspell helps to organize and archive your paper documents.";
 | 
				
			||||||
@@ -60,12 +60,19 @@ in
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    installPhase = ''
 | 
					    installPhase = ''
 | 
				
			||||||
      mkdir -p $out/bin
 | 
					      mkdir -p $out/bin
 | 
				
			||||||
      cp $src/consumedir.sh $out/bin/
 | 
					 | 
				
			||||||
      cp $src/ds.sh $out/bin/ds
 | 
					      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,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/*
 | 
					      chmod 755 $out/bin/*
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user