nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit d172c7df34e75c9b8965800aab4f64dc024d8af6
parent 68784b8079e36dc38d84e0bd1ad3269b25dee15e
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sun,  4 Dec 2022 01:15:37 +0300

Cross compilation support

Diffstat:
Mflake.lock | 10+++++-----
Mflake.nix | 29++++++++++++++++++-----------
2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -17,15 +17,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1669443273, - "narHash": "sha256-/Ow9P6dWfkQF/9NKD7+OnMnz5DJr2pVCAUMjU9SwFoo=", - "owner": "NixOS", + "lastModified": 1670058159, + "narHash": "sha256-ERiP2JWanLuGV1PDyHTbcigFCfIi9oco5LFdMJHjREE=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "6b86759692b80e2b563e7f6c608f753de4aad3a7", + "rev": "49b8ad618e64d9fe9ab686817bfebe047860dcae", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" diff --git a/flake.nix b/flake.nix @@ -1,15 +1,22 @@ { description = "My personal NUR repository"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let pkgs = nixpkgs.legacyPackages.${system}; - in { - packages = import ./default.nix { - inherit pkgs; - inherit system; - }; - nixosModules = import ./modules; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: { + overlay = final: prev: import ./pkgs { pkgs = prev; }; + nixosModules = import ./modules; + } // flake-utils.lib.eachDefaultSystem (system: { + packages = flake-utils.lib.filterPackages system (import ./default.nix { + pkgs = nixpkgs.legacyPackages.${system}; }); + legacyPackages = import nixpkgs { + inherit system; + overlays = [ self.overlay ]; + crossOverlays = [ self.overlay ]; + }; + }); }