From b1231dc016cee963b4cb90a0d37e08f6842891be Mon Sep 17 00:00:00 2001 From: SCOTT-HAMILTON Date: Wed, 10 Jul 2024 16:34:24 +0200 Subject: [PATCH] fix CI --- README.md | 5 ++--- default.nix | 8 +++++--- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 25 ------------------------- flakes/master/flake.lock | 27 +++++++++++++++++++++++++++ flakes/master/flake.nix | 23 +++++++++++++++++++++++ flakes/nixos-unstable/flake.lock | 27 +++++++++++++++++++++++++++ flakes/nixos-unstable/flake.nix | 23 +++++++++++++++++++++++ flakes/nixpkgs-unstable/flake.lock | 27 +++++++++++++++++++++++++++ flakes/nixpkgs-unstable/flake.nix | 23 +++++++++++++++++++++++ scripts/build-ci.sh | 28 ++-------------------------- 11 files changed, 186 insertions(+), 57 deletions(-) create mode 100644 flake.lock delete mode 100644 flake.nix create mode 100644 flakes/master/flake.lock create mode 100644 flakes/master/flake.nix create mode 100644 flakes/nixos-unstable/flake.lock create mode 100644 flakes/nixos-unstable/flake.nix create mode 100644 flakes/nixpkgs-unstable/flake.lock create mode 100644 flakes/nixpkgs-unstable/flake.nix diff --git a/README.md b/README.md index 7c544c5b8..35baca327 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ $ nix-shell update-readme-tables/shell.nix --command run | [cargo-sort-ck-1.1](https://github.com/devinr528/cargo-sort-ck) | nur.repos.shamilton.cargo-sort-ck | Check if tables and items in a .toml file are lexically sorted | | [CdC-cognitoform-result-generator-0.1](https://github.com/SCOTT-HAMILTON/CdC-cognitoform-result-generator) | nur.repos.shamilton.cdc-cognitoform-result-generator | Generates a latex formatted output from an xlsx cognitoform excel sheet, made for classes councils preparation | | [chunkdrive-2023-08-12](https://github.com/devinr528/cargo-sort-ck) | nur.repos.shamilton.chunkdrive | Check if tables and items in a .toml file are lexically sorted | -| [commix-3.7](https://commixproject.com/) | nur.repos.shamilton.commix | Automated All-in-One OS Command Injection Exploitation Tool | +| [commix-3.9](https://commixproject.com/) | nur.repos.shamilton.commix | Automated All-in-One OS Command Injection Exploitation Tool | | [Compton-0.1_beta2](https://github.com/tryone144/compton) | nur.repos.shamilton.compton | Compositor for X11 | | [ControlsForFake-unstable](https://github.com/SCOTT-HAMILTON/ControlsForFake) | nur.repos.shamilton.controls-for-fake | The Qt gui frontend for FakeMicWavPlayer | | [python3.11-day-night-plasma-wallpapers-2022-02-11](https://github.com/SCOTT-HAMILTON/Day-night-plasma-wallpapers) | nur.repos.shamilton.day-night-plasma-wallpapers | KDE Plasma utility to automatically change to a night wallpaper when the sun is reaching sunset | @@ -124,14 +124,13 @@ $ nix-shell update-readme-tables/shell.nix --command run | [qrup-2022-06-17](https://github.com/SCOTT-HAMILTON/qrup) | nur.repos.shamilton.qrup | Transfer files over LAN from your mobile device to your computer. | | [perl5.38.2-renrot-1.2.0](https://puszcza.gnu.org.ua/projects/renrot/) | nur.repos.shamilton.renrot | Utility to renames files according the flexible name template | | rpi-fan-unstable | nur.repos.shamilton.rpi-fan | Little bash script to that controls the rpi fans | -| [rpi-fan-serve-unstable](https://github.com/SCOTT-HAMILTON/rpi-fan-serve) | nur.repos.shamilton.rpi-fan-serve | A web service to access rpi-fan data | | [scim-0.8.3](https://github.com/andmarti1424/sc-im) | nur.repos.shamilton.scim | Ncurses spreadsheet program for the terminal | | [Scripts-unstable](https://github.com/SCOTT-HAMILTON/Scripts) | nur.repos.shamilton.scripts | Scripts to make my life easier | | [slick-greeter-master.mint22](https://github.com/linuxmint/slick-greeter) | nur.repos.shamilton.slick-greeter | A slick-looking LightDM greeter | | [smtprelay-1.11.1](https://github.com/knqyf263/pet) | nur.repos.shamilton.smtprelay | Simple command-line snippet manager, written in Go | | [spectacle-clipboard-unstable](https://github.com/SCOTT-HAMILTON/spectacle) | nur.repos.shamilton.spectacle-clipboard | KDE Spectacle fork to enable clipboard funcionnalities | | [splat-1.4.2](https://www.qsl.net/kd2bd/splat.html) | nur.repos.shamilton.splat | Terrain analysis tool for the electromagnetic spectrum | -| [python3.11-ssh-python-0.10.0](https://github.com/ParallelSSH/ssh-python) | nur.repos.shamilton.ssh-python | Bindings for libssh C library | +| [python3.10-ssh-python-0.10.0](https://github.com/ParallelSSH/ssh-python) | nur.repos.shamilton.ssh-python | Bindings for libssh C library | | [python3.11-ssh2-python-1.0.0](https://github.com/ParallelSSH/ssh2-python) | nur.repos.shamilton.ssh2-python | Super fast SSH2 protocol library | | [python3.11-sync-database-2023-07-11](https://github.com/SCOTT-HAMILTON/sync-database) | nur.repos.shamilton.sync-database | Keepass databases synching script to ssh servers and phone | | [python3.11-tabula-py-2.6.0](https://github.com/chezou/tabula-py) | nur.repos.shamilton.tabula-py | Simple wrapper for tabula-java, read tables from PDF into DataFrame | diff --git a/default.nix b/default.nix index 93b064184..fec2a11b9 100644 --- a/default.nix +++ b/default.nix @@ -173,10 +173,12 @@ pkgs.lib.traceValFn (x: eom = mate.eom; inherit (self) merge-keepass; }; - slick-greeter = with pkgs; pkgs.callPackage ./pkgs/slick-greeter { - inherit (gnome3) gnome-common slick-greeter; + slick-greeter = with pkgs; pkgs.callPackage ./pkgs/slick-greeter ({ + inherit (gnome3) slick-greeter; inherit (cinnamon) xapps; - }; + } // (if nixosVersion == "master" then { + inherit (gnome3) gnome-common; + } else { })); smtprelay = pkgs.callPackage ./pkgs/smtprelay { inherit (pkgs) buildGoModule; }; spectacle-clipboard = pkgs.libsForQt5.callPackage ./pkgs/spectacle-clipboard { }; splat = pkgs.callPackage ./pkgs/splat { }; diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..f88cb20df --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1720571246, + "narHash": "sha256-nkUXwunTck+hNMt2wZuYRN+jf2ySRjKTzI0fo5TDH78=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "16e401f01842c5bb2499e78c1fe227f939c0c474", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 20a0f6fd1..000000000 --- a/flake.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - description = "My personal NUR repository"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - outputs = { self, nixpkgs }: - let - systems = [ - "x86_64-linux" - "i686-linux" - "x86_64-darwin" - "aarch64-linux" - "armv6l-linux" - "armv7l-linux" - ]; - forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); - - onlyUnbroken = attrs: - nixpkgs.lib.filterAttrs (n: v: !(builtins.hasAttr "broken" v.meta && v.meta.broken )) attrs; - in - { - legacyPackages = forAllSystems (system: import ./default.nix { - pkgs = import nixpkgs { inherit system; }; - }); - packages = onlyUnbroken (forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system})); - }; -} diff --git a/flakes/master/flake.lock b/flakes/master/flake.lock new file mode 100644 index 000000000..98f71cbea --- /dev/null +++ b/flakes/master/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1717179513, + "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flakes/master/flake.nix b/flakes/master/flake.nix new file mode 100644 index 000000000..f497f705e --- /dev/null +++ b/flakes/master/flake.nix @@ -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; + }; +} diff --git a/flakes/nixos-unstable/flake.lock b/flakes/nixos-unstable/flake.lock new file mode 100644 index 000000000..b0e8ac529 --- /dev/null +++ b/flakes/nixos-unstable/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1720418205, + "narHash": "sha256-cPJoFPXU44GlhWg4pUk9oUPqurPlCFZ11ZQPk21GTPU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "655a58a72a6601292512670343087c2d75d859c1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flakes/nixos-unstable/flake.nix b/flakes/nixos-unstable/flake.nix new file mode 100644 index 000000000..e2e8fb22f --- /dev/null +++ b/flakes/nixos-unstable/flake.nix @@ -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; + }; +} diff --git a/flakes/nixpkgs-unstable/flake.lock b/flakes/nixpkgs-unstable/flake.lock new file mode 100644 index 000000000..f88cb20df --- /dev/null +++ b/flakes/nixpkgs-unstable/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1720571246, + "narHash": "sha256-nkUXwunTck+hNMt2wZuYRN+jf2ySRjKTzI0fo5TDH78=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "16e401f01842c5bb2499e78c1fe227f939c0c474", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flakes/nixpkgs-unstable/flake.nix b/flakes/nixpkgs-unstable/flake.nix new file mode 100644 index 000000000..53e66ace8 --- /dev/null +++ b/flakes/nixpkgs-unstable/flake.nix @@ -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; + }; +} diff --git a/scripts/build-ci.sh b/scripts/build-ci.sh index 79e2d6e1b..39b438432 100755 --- a/scripts/build-ci.sh +++ b/scripts/build-ci.sh @@ -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}"