From b6ae96cb84e7c93a55f4ec02f106f3900a48f25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sun, 22 Feb 2026 12:43:18 +0100 Subject: [PATCH] feat: refactor packages for nicer devux --- flake.nix | 15 +++++++++++---- packages/ahab.nix | 3 +-- packages/ca-matheo-si.nix | 3 +-- packages/ggman.nix | 5 ++--- packages/git-linearize.nix | 3 +-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 9fa703b..7c040dd 100644 --- a/flake.nix +++ b/flake.nix @@ -107,10 +107,17 @@ pkgs = nixpkgs.legacyPackages.${system}; in { - packages = import ./packages { - inherit my-lib; - inherit (nixpkgs) lib; - } (inputs // { inherit system; }); + packages = + import ./packages + { + inherit my-lib; + inherit (nixpkgs) lib; + } + { + pkgs = nixpkgs.legacyPackages.${system}; + pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system}; + pkgs-master = inputs.nixpkgs-master.legacyPackages.${system}; + }; formatter = pkgs.nixfmt-tree; diff --git a/packages/ahab.nix b/packages/ahab.nix index 6e00454..a0d47e2 100644 --- a/packages/ahab.nix +++ b/packages/ahab.nix @@ -1,7 +1,6 @@ -{ nixpkgs, system, ... }: +{ pkgs, ... }: let - pkgs = import nixpkgs { inherit system; }; version = "v0.3.2"; in pkgs.rustPlatform.buildRustPackage { diff --git a/packages/ca-matheo-si.nix b/packages/ca-matheo-si.nix index da7b2a1..591cfc0 100644 --- a/packages/ca-matheo-si.nix +++ b/packages/ca-matheo-si.nix @@ -1,7 +1,6 @@ -{ nixpkgs, system, ... }: +{ pkgs, ... }: let - pkgs = import nixpkgs { inherit system; }; version = "C6r62em"; in diff --git a/packages/ggman.nix b/packages/ggman.nix index 8430519..7eaad2d 100644 --- a/packages/ggman.nix +++ b/packages/ggman.nix @@ -1,8 +1,7 @@ -{ nixpkgs-master, system, ... }: +{ pkgs-master, ... }: let - nixpkgs = nixpkgs-master; - pkgs = import nixpkgs { inherit system; }; + pkgs = pkgs-master; version = "e24855c"; in pkgs.buildGoModule.override diff --git a/packages/git-linearize.nix b/packages/git-linearize.nix index e9c1601..73be4d3 100644 --- a/packages/git-linearize.nix +++ b/packages/git-linearize.nix @@ -1,7 +1,6 @@ -{ nixpkgs, system, ... }: +{ pkgs, ... }: let - pkgs = import nixpkgs { inherit system; }; version = "main"; in pkgs.stdenv.mkDerivation {