From 2e89ec91d0f0232da4a869f98af09473dbd5b880 Mon Sep 17 00:00:00 2001 From: molarmanful Date: Tue, 14 Jan 2025 02:35:39 -0500 Subject: [PATCH] look ma no overlays --- default.nix | 4 ++-- flake.lock | 6 +++--- flake.nix | 62 +++++++++++++++++++++-------------------------------- img.nix | 4 ++-- 4 files changed, 31 insertions(+), 45 deletions(-) diff --git a/default.nix b/default.nix index 313b1b0..48f32ce 100644 --- a/default.nix +++ b/default.nix @@ -4,10 +4,10 @@ cfg ? "", nerd ? false, release ? false, + P, lib, stdenvNoCC, - bited-build, ... }: @@ -18,7 +18,7 @@ stdenvNoCC.mkDerivation { buildPhase = '' runHook preBuild rm -rf out - ${bited-build}/bin/bited-build ${cfg} \ + ${P.bited-build}/bin/bited-build ${cfg} \ ${lib.optionalString nerd "--nerd"} \ ${lib.optionalString release "--release"} runHook postBuild diff --git a/flake.lock b/flake.lock index 5d9cd7b..f677be9 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1736837794, - "narHash": "sha256-j7QUnfhtGoIiYrl2+mxKKSb51/gdMBd6+UhDotFyiKY=", + "lastModified": 1736839688, + "narHash": "sha256-pCWIOVTxespik6I7PnIiLZuEbhxgQOJnxIp1nqEcpYI=", "owner": "molarmanful", "repo": "bited-utils", - "rev": "6af25c24d06d7dc8ddc4b186a2cf17bc2663d2e7", + "rev": "3c16505d89b052a9686595da2c2f16650e0184e3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4d4b438..29251c0 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,6 @@ outputs = { - self, nixpkgs, utils, bited-utils, @@ -24,48 +23,35 @@ version = builtins.readFile ./VERSION; in - { - overlays.default = - final: prev: - let - build = o: final.callPackage ./. ({ inherit version; } // o); - in - { - kirsch = build { pname = name; }; - kirsch-nerd = build { - pname = "${name}-nerd"; - nerd = true; - }; - kirsch-release = build { - pname = "${name}-release"; - nerd = true; - release = true; - }; - kirsch-img = final.callPackage ./img.nix { - name = "${name}-img"; - }; - }; - } - - // utils.lib.eachDefaultSystem ( + utils.lib.eachDefaultSystem ( system: let - pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [ - bited-utils.overlays.default - self.overlays.default - ]; + pkgs = nixpkgs.legacyPackages.${system}; + P = bited-utils.packages.${system}; in { - packages = { - inherit (pkgs) - kirsch - kirsch-nerd - kirsch-release - kirsch-img - ; - default = pkgs.kirsch; - }; + packages = + let + build = o: pkgs.callPackage ./. ({ inherit version P; } // o); + in + rec { + kirsch = build { pname = name; }; + kirsch-nerd = build { + pname = "${name}-nerd"; + nerd = true; + }; + kirsch-release = build { + pname = "${name}-release"; + nerd = true; + release = true; + }; + kirsch-img = pkgs.callPackage ./img.nix { + inherit P; + name = "${name}-img"; + }; + default = kirsch; + }; devShells.default = pkgs.mkShell { packages = with pkgs; [ diff --git a/img.nix b/img.nix index 74b3114..a4fa7e9 100644 --- a/img.nix +++ b/img.nix @@ -1,13 +1,13 @@ { name, cfg ? "", + P, writeShellApplication, - bited-img, ... }: writeShellApplication { inherit name; - text = "${bited-img}/bin/bited-img ${cfg}"; + text = "${P.bited-img}/bin/bited-img ${cfg}"; }