From 4cd72752936b0046b9b4fd7ffc600fe33e53e9b3 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 7 Feb 2023 14:55:16 -0500 Subject: [PATCH] Fix bug in flake file --- flake.nix | 6 +++--- python/default.nix | 2 +- python/shell.nix | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index e0f05d9..e31f50f 100644 --- a/flake.nix +++ b/flake.nix @@ -17,12 +17,12 @@ # Get all project directories currentDir = builtins.readDir ./.; - dirs = lib.filterAttrs (_: v: v == "directory") currentDir; + dirs = builtins.attrNames (lib.filterAttrs (_: v: v == "directory") currentDir); in - lib.concatMapAttrs (dir: _: { + builtins.foldl' lib.recursiveUpdate {} (builtins.map (dir: { packages.${dir} = pkgs.callPackage ./${dir} {}; } // lib.optionalAttrs (hasShell dir) { devShells.${dir} = pkgs.callPackage ./${dir}/shell.nix {}; - }) dirs + }) dirs) ); } diff --git a/python/default.nix b/python/default.nix index 76a15d5..6c22630 100644 --- a/python/default.nix +++ b/python/default.nix @@ -1,4 +1,4 @@ -{ python3, ... }: +{ python3 }: python3.pkgs.buildPythonApplication { pname = "soe-python"; diff --git a/python/shell.nix b/python/shell.nix index 5feafb5..332eaff 100644 --- a/python/shell.nix +++ b/python/shell.nix @@ -1,2 +1,3 @@ -{ python3, ... }: +{ python3 }: + python3.buildEnv.env