diff options
| author | lassulus <git@lassul.us> | 2026-01-11 01:29:31 +0100 |
|---|---|---|
| committer | lassulus <git@lassul.us> | 2026-01-11 01:29:31 +0100 |
| commit | 68d3c925b0edb958fcbafa589d35967dfb2a979c (patch) | |
| tree | 82018f93e411fcad47cb45867c646ce0f8feb683 /flake.nix | |
| parent | 39ef2da7d30dba7c5c1556ffa90d330a9607bb44 (diff) | |
5pkgs: fix nix flake show compatibility
Integrate nix-writers flake for extended writer functions (writeJq,
writeGawkBin, etc.) using a fixpoint overlay so functions can reference
each other.
Update Python packages to new buildPythonPackage format:
- Add pyproject = true and build-system for ovh-zone, python-dnsstamps,
ssh-audit, tinc_graphs
Fix writer function usage by taking them as arguments instead of
accessing via pkgs:
- nixos-format-error, untilport, qrscan, logf, gitignore, urix, etc.
Update deprecated nixpkgs attribute names:
- gdk_pixbuf -> gdk-pixbuf
- libSM/libX11/libXinerama -> xorg.*
- buildGo120Module -> buildGoModule
Remove obsolete/broken packages:
- buildbot-classic-slave (missing buildbot-classic)
- cac-panel, drivedroid-gen-repo (Python 2 / format issues)
- games-user-env, generate-secrets (unused)
- internetarchive, bepasty-client-cli, krebspaste (Python 2)
- qrscan (conflicts with removed nixpkgs package)
Other fixes:
- Use lib.callPackageWith for package interdependencies
- Only export derivations in flake packages output
- Limit packages output to Linux systems
- Fix IFD in ukrepl by passing path to writer instead of readFile
- Import stockholm.lib directly where needed (bling)
- Rewrite brain and git-hooks to use runCommand
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -1,10 +1,7 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - nix-writers = { - url = "git+https://cgit.krebsco.de/nix-writers"; - flake = false; - }; + nix-writers.url = "git+https://cgit.krebsco.de/nix-writers"; # disko.url = "github:nix-community/disko"; # disko.inputs.nixpkgs.follows = "nixpkgs"; buildbot-nix.url = "github:Mic92/buildbot-nix"; @@ -43,9 +40,21 @@ }; overlays.default = import ./krebs/5pkgs/default.nix; packages = let - packageNames = self.lib.attrNames (self.lib.mapNixDir (x: null) ./krebs/5pkgs/simple); - appliedOverlay = (system: self.overlays.default {} (self.inputs.nixpkgs.legacyPackages.${system} // { lib = self.lib; })); - in nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ] (system: self.lib.getAttrs packageNames (appliedOverlay system)); + allNames = self.lib.attrNames (self.lib.mapNixDir (x: null) ./krebs/5pkgs/simple); + appliedOverlay = (system: + let + base = self.inputs.nixpkgs.legacyPackages.${system}; + # Apply nix-writers overlay with fixpoint so its functions can find each other + withWriters = nixpkgs.lib.fix (final: base // nix-writers.overlays.default final base); + in self.overlays.default {} (withWriters // { lib = self.lib; })); + # Only include derivations in packages output + getDerivations = overlay: builtins.listToAttrs (builtins.filter (x: x != null) (map (name: + let val = overlay.${name} or null; + in if val != null && (val.type or null) == "derivation" + then { inherit name; value = val; } + else null + ) allNames)); + in nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: getDerivations (appliedOverlay system)); lib = import (self.outPath + "/lib/pure.nix") { lib = nixpkgs.lib; }; }; } |
