Loading ci/OWNERS +0 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo /pkgs/applications/networking/browsers/firefox/update.nix /pkgs/applications/networking/browsers/firefox/packages/firefox.nix @mweinelt /pkgs/applications/networking/browsers/firefox/packages/firefox-esr-*.nix @mweinelt /pkgs/applications/networking/browsers/librewolf @squalus @DominicWrege @fpletz /pkgs/applications/networking/browsers/chromium @emilylange @networkException /nixos/tests/chromium.nix @emilylange @networkException Loading maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -11780,6 +11780,12 @@ githubId = 1358764; name = "Jamie Magee"; }; janhencic = { name = "Jan Hencic"; email = "jan@hencic.com"; github = "janhencic"; githubId = 61284133; }; jankaifer = { name = "Jan Kaifer"; email = "jan@kaifer.cz"; Loading nixos/modules/services/security/crowdsec.nix +1 −1 Original line number Diff line number Diff line Loading @@ -602,7 +602,7 @@ in ++ lib.optionals (cfg.settings.console.tokenFile != null) [ '' if [ ! -e "${cfg.settings.console.tokenFile}" ]; then ${lib.getExe cscli} console enroll "$(cat ${cfg.settings.console.tokenFile})" --name ${cfg.name} ${lib.getExe cscli} console enroll "$(${lib.getExe' pkgs.coreutils "cat"} ${cfg.settings.console.tokenFile})" --name ${cfg.name} fi '' ]; Loading pkgs/applications/video/kodi/addons/youtube/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -10,13 +10,13 @@ buildKodiAddon rec { pname = "youtube"; namespace = "plugin.video.youtube"; version = "7.4.0"; version = "7.4.0.1"; src = fetchFromGitHub { owner = "anxdpanic"; repo = "plugin.video.youtube"; rev = "v${version}"; hash = "sha256-IEfgpl/uuELQ+4dVqek7/iCHW+sooVZ5eiASNXnm5EA="; hash = "sha256-8cWwsaF37tVfj3ATWVn9r2UMwQa4SZiXL3x8GW67EfE="; }; propagatedBuildInputs = [ Loading pkgs/build-support/fetchfossil/nix-prefetch-fossil 0 → 100755 +125 −0 Original line number Diff line number Diff line #!/bin/sh -e url= rev= expHash= hashType="${NIX_HASH_ALGO:-sha256}" # Parse command line arguments argi=0 argfun="" for arg; do if test -z "$argfun"; then case $arg in --url) argfun=set_url;; --rev) argfun=set_rev;; --hash) argfun=set_expHash;; --help|-h) echo "Usage: nix-prefetch-fossil [options] [URL [REVISION [EXPECTED-HASH]]]" echo "" echo "Options:" echo " --url URL Fossil repository URL" echo " --rev REV Fossil revision/tag/branch (default: trunk)" echo " --hash HASH Expected hash" echo " --help Show this help message" exit 0 ;; *) argi=$((argi + 1)) case $argi in 1) url=$arg;; 2) rev=$arg;; 3) expHash=$arg;; *) echo "Too many arguments" >&2; exit 1;; esac ;; esac else case $argfun in set_*) var=${argfun#set_} eval "$var='$arg'" ;; esac argfun="" fi done if test -z "$url"; then echo "error: URL is required" >&2 echo "Usage: nix-prefetch-fossil [URL [REVISION [EXPECTED-HASH]]]" >&2 exit 1 fi # Default to trunk if no revision specified if test -z "$rev"; then rev="trunk" fi # If the hash was given, check if we already have it in store if test -n "$expHash"; then finalPath=$(nix-store --print-fixed-path --recursive "$hashType" "$expHash" fossil-archive) if nix-store --check-validity "$finalPath" 2> /dev/null; then echo "$expHash" exit 0 fi fi # Create temporary directory for cloning tmpPath="$(mktemp -d --tmpdir fossil-checkout-tmp-XXXXXXXX)" cleanup() { rm -rf "$tmpPath"; } trap cleanup EXIT # Fossil wants to write global configuration to $HOME/.fossil # We'll let it write to the temp directory instead export HOME="$tmpPath" echo "Fetching Fossil repository $url at revision $rev..." >&2 # Clone the repository fossil clone -A nobody "$url" "$tmpPath/fossil-clone.fossil" >&2 # Create directory for checkout checkoutDir="$tmpPath/checkout" mkdir -p "$checkoutDir" # Open the repository at the specified revision cd "$checkoutDir" fossil open "$tmpPath/fossil-clone.fossil" "$rev" >&2 # Get the actual commit hash and date checkoutLine=$(fossil info | grep ^checkout:) # Remove 'checkout:' prefix and squeeze multiple spaces, then extract fields actualRev=$(echo "$checkoutLine" | sed 's/^checkout:[[:space:]]*//' | tr -s ' ' | cut -d' ' -f1) # Extract date (format: checkout: HASH YYYY-MM-DD HH:MM:SS UTC) actualDate=$(echo "$checkoutLine" | sed 's/^checkout:[[:space:]]*//' | tr -s ' ' | cut -d' ' -f2) cd - >/dev/null # Remove the fossil checkout file rm -f "$checkoutDir/.fslckout" # Calculate the hash hash=$(nix-hash --type "$hashType" --base32 "$checkoutDir") echo "hash is $hash" >&2 # Add to store if we don't have an expected hash or if it matches if test -z "$expHash" || test "$expHash" = "$hash"; then finalPath=$(nix-store --add-fixed --recursive "$hashType" "$checkoutDir") echo "path is $finalPath" >&2 elif test -n "$expHash" && test "$expHash" != "$hash"; then echo "error: hash mismatch for Fossil repository $url" >&2 echo " expected: $expHash" >&2 echo " actual: $hash" >&2 exit 1 fi # Output JSON result cat <<EOF { "url": "$url", "rev": "$actualRev", "date": "$actualDate", "$hashType": "$hash", "hash": "$(nix-hash --to-sri --type $hashType $hash)" } EOF Loading
ci/OWNERS +0 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo /pkgs/applications/networking/browsers/firefox/update.nix /pkgs/applications/networking/browsers/firefox/packages/firefox.nix @mweinelt /pkgs/applications/networking/browsers/firefox/packages/firefox-esr-*.nix @mweinelt /pkgs/applications/networking/browsers/librewolf @squalus @DominicWrege @fpletz /pkgs/applications/networking/browsers/chromium @emilylange @networkException /nixos/tests/chromium.nix @emilylange @networkException Loading
maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -11780,6 +11780,12 @@ githubId = 1358764; name = "Jamie Magee"; }; janhencic = { name = "Jan Hencic"; email = "jan@hencic.com"; github = "janhencic"; githubId = 61284133; }; jankaifer = { name = "Jan Kaifer"; email = "jan@kaifer.cz"; Loading
nixos/modules/services/security/crowdsec.nix +1 −1 Original line number Diff line number Diff line Loading @@ -602,7 +602,7 @@ in ++ lib.optionals (cfg.settings.console.tokenFile != null) [ '' if [ ! -e "${cfg.settings.console.tokenFile}" ]; then ${lib.getExe cscli} console enroll "$(cat ${cfg.settings.console.tokenFile})" --name ${cfg.name} ${lib.getExe cscli} console enroll "$(${lib.getExe' pkgs.coreutils "cat"} ${cfg.settings.console.tokenFile})" --name ${cfg.name} fi '' ]; Loading
pkgs/applications/video/kodi/addons/youtube/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -10,13 +10,13 @@ buildKodiAddon rec { pname = "youtube"; namespace = "plugin.video.youtube"; version = "7.4.0"; version = "7.4.0.1"; src = fetchFromGitHub { owner = "anxdpanic"; repo = "plugin.video.youtube"; rev = "v${version}"; hash = "sha256-IEfgpl/uuELQ+4dVqek7/iCHW+sooVZ5eiASNXnm5EA="; hash = "sha256-8cWwsaF37tVfj3ATWVn9r2UMwQa4SZiXL3x8GW67EfE="; }; propagatedBuildInputs = [ Loading
pkgs/build-support/fetchfossil/nix-prefetch-fossil 0 → 100755 +125 −0 Original line number Diff line number Diff line #!/bin/sh -e url= rev= expHash= hashType="${NIX_HASH_ALGO:-sha256}" # Parse command line arguments argi=0 argfun="" for arg; do if test -z "$argfun"; then case $arg in --url) argfun=set_url;; --rev) argfun=set_rev;; --hash) argfun=set_expHash;; --help|-h) echo "Usage: nix-prefetch-fossil [options] [URL [REVISION [EXPECTED-HASH]]]" echo "" echo "Options:" echo " --url URL Fossil repository URL" echo " --rev REV Fossil revision/tag/branch (default: trunk)" echo " --hash HASH Expected hash" echo " --help Show this help message" exit 0 ;; *) argi=$((argi + 1)) case $argi in 1) url=$arg;; 2) rev=$arg;; 3) expHash=$arg;; *) echo "Too many arguments" >&2; exit 1;; esac ;; esac else case $argfun in set_*) var=${argfun#set_} eval "$var='$arg'" ;; esac argfun="" fi done if test -z "$url"; then echo "error: URL is required" >&2 echo "Usage: nix-prefetch-fossil [URL [REVISION [EXPECTED-HASH]]]" >&2 exit 1 fi # Default to trunk if no revision specified if test -z "$rev"; then rev="trunk" fi # If the hash was given, check if we already have it in store if test -n "$expHash"; then finalPath=$(nix-store --print-fixed-path --recursive "$hashType" "$expHash" fossil-archive) if nix-store --check-validity "$finalPath" 2> /dev/null; then echo "$expHash" exit 0 fi fi # Create temporary directory for cloning tmpPath="$(mktemp -d --tmpdir fossil-checkout-tmp-XXXXXXXX)" cleanup() { rm -rf "$tmpPath"; } trap cleanup EXIT # Fossil wants to write global configuration to $HOME/.fossil # We'll let it write to the temp directory instead export HOME="$tmpPath" echo "Fetching Fossil repository $url at revision $rev..." >&2 # Clone the repository fossil clone -A nobody "$url" "$tmpPath/fossil-clone.fossil" >&2 # Create directory for checkout checkoutDir="$tmpPath/checkout" mkdir -p "$checkoutDir" # Open the repository at the specified revision cd "$checkoutDir" fossil open "$tmpPath/fossil-clone.fossil" "$rev" >&2 # Get the actual commit hash and date checkoutLine=$(fossil info | grep ^checkout:) # Remove 'checkout:' prefix and squeeze multiple spaces, then extract fields actualRev=$(echo "$checkoutLine" | sed 's/^checkout:[[:space:]]*//' | tr -s ' ' | cut -d' ' -f1) # Extract date (format: checkout: HASH YYYY-MM-DD HH:MM:SS UTC) actualDate=$(echo "$checkoutLine" | sed 's/^checkout:[[:space:]]*//' | tr -s ' ' | cut -d' ' -f2) cd - >/dev/null # Remove the fossil checkout file rm -f "$checkoutDir/.fslckout" # Calculate the hash hash=$(nix-hash --type "$hashType" --base32 "$checkoutDir") echo "hash is $hash" >&2 # Add to store if we don't have an expected hash or if it matches if test -z "$expHash" || test "$expHash" = "$hash"; then finalPath=$(nix-store --add-fixed --recursive "$hashType" "$checkoutDir") echo "path is $finalPath" >&2 elif test -n "$expHash" && test "$expHash" != "$hash"; then echo "error: hash mismatch for Fossil repository $url" >&2 echo " expected: $expHash" >&2 echo " actual: $hash" >&2 exit 1 fi # Output JSON result cat <<EOF { "url": "$url", "rev": "$actualRev", "date": "$actualDate", "$hashType": "$hash", "hash": "$(nix-hash --to-sri --type $hashType $hash)" } EOF