parent
b84f878dbd
commit
acd7def6ed
28 changed files with 5069 additions and 143 deletions
25
programs/fish/scripts.nix
Normal file
25
programs/fish/scripts.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
calc = "${pkgs.custom.pipethon}/bin/python -i ${pkgs.writeText "init.py" ''
|
||||
import sys
|
||||
sys.path.append("${../../scriptlib}")
|
||||
|
||||
from scriptlib import *
|
||||
''} ";
|
||||
|
||||
# sys.path.append("${pkgs.python314Packages.numpy}/lib/python3.14/site-packages/")
|
||||
cp-media =
|
||||
name: media:
|
||||
let
|
||||
s = pkgs.writeScriptBin "cp-${name}" ''
|
||||
echo "copying to library ${media}"
|
||||
echo "calculating hash"
|
||||
find "$1" - type f - print0 | sort - z | xargs - 0 sha1sum | awk '{
|
||||
print $1}' | sha1sum | awk '{print $1}' > "$1.hash"
|
||||
|
||||
rsync -azP "$1" fili:/media/${media}
|
||||
rsync -azP "$1.hash" fili:/media/${media}
|
||||
'';
|
||||
in
|
||||
"${s}/bin/cp-${name}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue