feat(update script): make func for every src

This commit is contained in:
matt1432 2023-12-13 19:23:34 -05:00
parent cce40e99d0
commit 7d6309897f
2 changed files with 18 additions and 8 deletions

View file

@ -14,12 +14,11 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "pam-fprint-grosshack"; pname = "pam-fprint-grosshack";
version = "v0.3.0";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "mishakmak"; owner = "mishakmak";
repo = pname; repo = pname;
rev = version; rev = "45b42524fb5783e1e555067743d7e0f70d27888a";
sha256 = "sha256-obczZbf/oH4xGaVvp3y3ZyDdYhZnxlCWvL0irgEYIi0="; sha256 = "sha256-obczZbf/oH4xGaVvp3y3ZyDdYhZnxlCWvL0irgEYIi0=";
}; };

View file

@ -21,13 +21,11 @@ parseFetchurl() {
sed -i "s,sha256 = .*,sha256 = \"$HASH\";," "$FILE" sed -i "s,sha256 = .*,sha256 = \"$HASH\";," "$FILE"
} }
# TODO
# https://github.com/dasJ/spotifywm updateOverlays() {
# FILE="/home/matt/.nix/common/overlays"
# https://github.com/tio/input-emulator parseNurl "https://github.com/dasJ/spotifywm" "$FILE/spotifywm/spotifywm.nix"
# https://gitlab.com/mishakmak/pam-fprint-grosshack }
# https://gitlab.com/phoneybadger/pokemon-colorscripts
updateDracula() { updateDracula() {
FILE="/home/matt/.nix/common/overlays/dracula-theme" FILE="/home/matt/.nix/common/overlays/dracula-theme"
@ -39,6 +37,13 @@ updateDracula() {
parseFetchurl "https://github.com/aynp/dracula-wallpapers/blob/main/Art/4k/Waves%201.png?raw=true" "$FILE/wallpaper.nix" parseFetchurl "https://github.com/aynp/dracula-wallpapers/blob/main/Art/4k/Waves%201.png?raw=true" "$FILE/wallpaper.nix"
} }
updateCustomPkgs() {
FILE="/home/matt/.nix/common/pkgs"
parseNurl "https://github.com/tio/input-emulator" "$FILE/input-emulator/default.nix"
parseNurl "https://gitlab.com/mishakmak/pam-fprint-grosshack" "$FILE/pam-fprint-grosshack/default.nix"
parseNurl "https://gitlab.com/phoneybadger/pokemon-colorscripts" "$FILE/pokemon-colorscripts/default.nix"
}
updateFFZ() { updateFFZ() {
FILE="/home/matt/.nix/home/firefox/addons/default.nix" FILE="/home/matt/.nix/home/firefox/addons/default.nix"
URL="https://cdn.frankerfacez.com/script/frankerfacez-4.0-an+fx.xpi" URL="https://cdn.frankerfacez.com/script/frankerfacez-4.0-an+fx.xpi"
@ -80,15 +85,21 @@ updateGSR() {
) )
} }
doAll() { doAll() {
updateFFZ updateFFZ
updateCustomPkgs
updateOverlays
updateDracula updateDracula
updateFirefoxAddons updateFirefoxAddons
updateGSR updateGSR
} }
[[ "$1" == "-a" || "$1" == "--all" ]] && doAll [[ "$1" == "-a" || "$1" == "--all" ]] && doAll
[[ "$1" == "-d" || "$1" == "--dracula" ]] && updateDracula [[ "$1" == "-d" || "$1" == "--dracula" ]] && updateDracula
[[ "$1" == "-c" || "$1" == "--custom" ]] && updateCustomPkgs
[[ "$1" == "-o" || "$1" == "--overlays" ]] && updateOverlays
[[ "$1" == "-f" || "$1" == "--firefox" ]] && updateFirefoxAddons [[ "$1" == "-f" || "$1" == "--firefox" ]] && updateFirefoxAddons
[[ "$1" == "-ffz" || "$1" == "--frankerfacez" ]] && updateFFZ [[ "$1" == "-ffz" || "$1" == "--frankerfacez" ]] && updateFFZ
[[ "$1" == "-gsr" || "$1" == "--gpu-screen-recorder" ]] && updateGSR [[ "$1" == "-gsr" || "$1" == "--gpu-screen-recorder" ]] && updateGSR