Initial framework: reusable modules, lib, pkgs, overlays, scripts, sample environment
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Met à jour le commit de référence pour Nixpkgs
|
||||
|
||||
BRANCH="nixos-25.11"
|
||||
REPO="https://github.com/NixOS/nixpkgs"
|
||||
JSON_FILE="$(dirname "$0")/../pkgs/nixpkgs.json"
|
||||
|
||||
echo "Récupération du dernier commit sur $BRANCH..."
|
||||
REV=$(git ls-remote $REPO refs/heads/$BRANCH | cut -f1)
|
||||
|
||||
if [ -z "$REV" ]; then
|
||||
echo "Erreur : Impossible de récupérer le commit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Calcul du hash (cela peut prendre un moment)..."
|
||||
SHA256=$(nix-prefetch-url --unpack "https://github.com/NixOS/nixpkgs/archive/$REV.tar.gz")
|
||||
|
||||
cat <<EOF > "$JSON_FILE"
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/$REV.tar.gz",
|
||||
"rev": "$REV",
|
||||
"sha256": "$SHA256"
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "Succès ! Nixpkgs est maintenant épinglé au commit : $REV"
|
||||
Reference in New Issue
Block a user