diff options
author | sss <sss@dark-alexandr.net> | 2025-07-01 11:11:24 +0300 |
---|---|---|
committer | sss <sss@dark-alexandr.net> | 2025-07-02 11:43:33 +0300 |
commit | a2149f52e1f7aa1b1a8cc6c9637df53d9b82f452 (patch) | |
tree | 730d53c72eb4eae779359a3868922d3ab64cc5ef | |
parent | 1cc98c6faef01ca5de3eefda24c97794f406e2bf (diff) |
add flake support
-rw-r--r-- | darktable_my.nix | 3 | ||||
-rw-r--r-- | flake.nix | 22 |
2 files changed, 23 insertions, 2 deletions
diff --git a/darktable_my.nix b/darktable_my.nix index 88585c9..2eb9d92 100644 --- a/darktable_my.nix +++ b/darktable_my.nix @@ -17,8 +17,7 @@ self: super: { src = fetchGit { url = "https://github.com/darktable-org/darktable"; ref = "master"; -# rev = "d2f15c8d1da5bb9b72cb554f9f606db953fb75ed"; - rev = "cf3e972fb05d433a7764ee661850182ba456e128"; +# rev = "cf3e972fb05d433a7764ee661850182ba456e128"; submodules = true; # allRefs = true; }; diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..86ed20f --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + outputs = { self }: + let + nixFiles = builtins.filter + (f: f != "flake.nix" && builtins.match ".*\\.nix" f != null) + (builtins.attrNames (builtins.readDir ./.)); + + # Исправленная функция создания overlay + makeOverlay = file: { + name = builtins.replaceStrings [ ".nix" ] [ "" ] file; + value = inputs: (import (./. + "/${file}") { +# inherit inputs final prev; + inherit inputs; + }); + }; + + in { + overlays = builtins.listToAttrs (map makeOverlay nixFiles); +# allOverlays = builtins.attrValues overlaysSet; + }; +} + |