M .builds/nixpkgs-unstable.yml => .builds/nixpkgs-unstable.yml +3 -1
@@ 3,12 3,14 @@ repositories:
nixpkgs: https://nixos.org/channels/nixpkgs-unstable
packages:
- nixpkgs.cachix
+ - nixpkgs.nixUnstable
sources:
- https://git.sr.ht/~aasg/nixexprs
secrets:
- 06d44cfd-6ded-45c4-9ef4-8e1433f9054e
tasks:
- - test-lib: |
+ - test: |
+ nix --experimental-features 'nix-command flakes' flake check
nix-instantiate --eval --strict nixexprs/lib/tests.nix
- prepare: |
cachix use aasg-nixexprs
A flake.lock => flake.lock +43 -0
@@ 0,0 1,43 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "locked": {
+ "lastModified": 1601282935,
+ "narHash": "sha256-WQAFV6sGGQxrRs3a+/Yj9xUYvhTpukQJIcMbIi7LCJ4=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "588973065fce51f4763287f0fda87a174d78bf48",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1603609945,
+ "narHash": "sha256-wpzpI2J5O+nucFDBnof8Do9BgUXVlrwKBIHy5S27GO8=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "7ad5e816faba3f808e2a8815b14d0f023a4e2160",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
A flake.nix => flake.nix +33 -0
@@ 0,0 1,33 @@
+{
+ description = "aasg's Nix expressions";
+ inputs = {
+ flake-utils.url = "github:numtide/flake-utils";
+ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
+ };
+ outputs = { self, flake-utils, nixpkgs }:
+ let
+ inherit (flake-utils.lib) defaultSystems flattenTree;
+ inherit (nixpkgs.lib.attrsets) filterAttrs genAttrs mapAttrs;
+ inherit (nixpkgs.lib.strings) hasPrefix hasSuffix;
+ inherit (nixpkgs.lib.trivial) id pipe;
+ in
+ {
+ #lib = import ./lib { inherit (nixpkgs) lib; };
+ packages = genAttrs defaultSystems
+ (system: pipe (import ./pkgs { pkgs = nixpkgs.legacyPackages.${system}; }) [
+ # Filter out linuxPackages before it gets evaluated.
+ (if ! hasSuffix "linux" system
+ then filterAttrs (attr: drv: ! hasPrefix "linuxPackages" attr)
+ else id)
+ # Flatten package sets.
+ flattenTree
+ # Remove packages not compatible with this system.
+ (filterAttrs (attr: drv: builtins.elem system drv.meta.platforms))
+ ]);
+ nixosModules = mapAttrs (name: path: import path) (import ./modules);
+ overlays = {
+ pkgs = import ./pkgs/overlay.nix;
+ patches = import ./patches/overlay.nix;
+ };
+ };
+}