forked from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e632e1c
commit b1231dc
Showing
11 changed files
with
186 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
description = "My personal NUR repository"; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/24.05"; | ||
}; | ||
outputs = { self, nixpkgs }: | ||
let | ||
systems = [ | ||
"x86_64-linux" | ||
# "x86_64-darwin" | ||
]; | ||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); | ||
in | ||
rec { | ||
legacyPackages = forAllSystems (system: import ../../default.nix { | ||
pkgs = import nixpkgs { inherit system; }; | ||
nixosVersion = "master"; | ||
localUsage = false; | ||
}); | ||
packages = forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system}); | ||
checks = packages; | ||
}; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
description = "My personal NUR repository"; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
}; | ||
outputs = { self, nixpkgs }: | ||
let | ||
systems = [ | ||
"x86_64-linux" | ||
# "x86_64-darwin" | ||
]; | ||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); | ||
in | ||
rec { | ||
legacyPackages = forAllSystems (system: import ../../default.nix { | ||
pkgs = import nixpkgs { inherit system; }; | ||
nixosVersion = "nixos-unstable"; | ||
localUsage = false; | ||
}); | ||
packages = forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system}); | ||
checks = packages; | ||
}; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
description = "My personal NUR repository"; | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
outputs = { self, nixpkgs }: | ||
let | ||
systems = [ | ||
"x86_64-linux" | ||
# "x86_64-darwin" | ||
]; | ||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); | ||
in | ||
rec { | ||
legacyPackages = forAllSystems (system: import ../../default.nix { | ||
pkgs = import nixpkgs { inherit system; }; | ||
nixosVersion = "nixpkgs-unstable"; | ||
localUsage = false; | ||
}); | ||
packages = forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system}); | ||
checks = packages; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,4 @@ | ||
#!/bin/bash | ||
|
||
eval_output=$(nix-eval-jobs --gc-roots-dir gcroot --argstr nixosVersion "${CHANNEL_BRANCH}" --check-cache-status all-unbroken.nix) | ||
|
||
while IFS= read -r line; do | ||
is_cached=$(echo "$line" | jq '.isCached') | ||
drv_path=$(echo "$line" | jq '.drvPath' | tr -d '"') | ||
if [[ "$is_cached" == "false" ]]; then | ||
result+=("$drv_path") | ||
fi | ||
done <<< "$eval_output" | ||
|
||
if [[ ${#result[@]} -ne 0 ]]; then | ||
echo "Building the folling derivations: ${result[*]}" | ||
echo cachix watch-exec "${CACHIX_CACHE}" -- nix-build --argstr nixosVersion "${CHANNEL_BRANCH}" ${result[*]} --show-trace | ||
cachix watch-exec "${CACHIX_CACHE}" -- nix-build --argstr nixosVersion "${CHANNEL_BRANCH}" ${result[*]} --show-trace | ||
fi | ||
rm -rf gcroot | ||
|
||
remaining=$(nix-build --dry-run --argstr nixosVersion all-unbroken.nix 2>&1 | awk '/^these.*derivations will be built/,/^these.*paths will be fetched/' | sed '1d;$d') | ||
count=$(printf "%s" "$remaining" | wc -l) | ||
if [ $count -gt 0 ]; then | ||
echo "There remains $count derivations to be built:" | ||
echo $remaining | ||
exit 1 | ||
else | ||
echo "No new derivations to build, everything is up-to-date." | ||
fi | ||
cd "flakes/${CHANNEL_BRANCH}" | ||
nix run github:Mic92/nix-fast-build -- --skip-cached --no-nom --cachix-cache "${CACHIX_CACHE}" |