From 311d6274b52ca036edc94859cd882388e6a5c9c1 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Tue, 16 Jul 2024 09:35:09 +0200 Subject: [PATCH] switch from import to callPackage in nix --- flake.nix | 4 ++-- nix/shell.nix | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index c24f458..bc7fb5c 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ system: let pkgs = pkgsForEach.${system}; in rec { - osuplusplus = import ./nix/shell.nix {inherit pkgs;}; + osuplusplus = pkgs.callPackage ./nix/shell.nix {}; default = osuplusplus; } ); @@ -22,7 +22,7 @@ system: let pkgs = pkgsForEach.${system}; in rec { - osuplusplus = import ./nix/default.nix {inherit (pkgs) lib stdenv sfml;}; + osuplusplus = pkgs.callPackage ./nix/default.nix {}; default = osuplusplus; } ); diff --git a/nix/shell.nix b/nix/shell.nix index ed3c3cd..4bee28a 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -1,15 +1,22 @@ -{pkgs}: -pkgs.mkShell { +{ + mkShell, + gcc, + gnumake, + clang-tools, + sfml, + ... +}: +mkShell { name = "osu++"; - nativeBuildInputs = with pkgs; [ + nativeBuildInputs = [ gcc gnumake # for clang-format clang-tools ]; - buildInputs = with pkgs; [ + buildInputs = [ sfml ]; }