diff --git a/flake.nix b/flake.nix index 149fdf7e..7985ca4b 100644 --- a/flake.nix +++ b/flake.nix @@ -47,5 +47,9 @@ "x86_64-darwin" "aarch64-darwin" ]; + flake.lib = import ./lib { + inherit (inputs.nixpkgs) lib; + dream2nix = inputs.self; + }; }; } diff --git a/modules/flake-parts/lib/default.nix b/lib/default.nix similarity index 77% rename from modules/flake-parts/lib/default.nix rename to lib/default.nix index cdcf3f78..01c86fd3 100644 --- a/modules/flake-parts/lib/default.nix +++ b/lib/default.nix @@ -1,13 +1,9 @@ { - self, lib, - inputs, + dream2nix, ... -}: { - flake.options.lib = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - }; - flake.config.lib.importPackages = args @ { +}: rec { + importPackages = args @ { projectRoot, projectRootFile, packagesDir, @@ -28,7 +24,7 @@ lib.mapAttrs ( module: type: - self.lib.evalModules (forwardedArgs + evalModules (forwardedArgs // { modules = args.modules @@ -45,7 +41,7 @@ ) (builtins.readDir packagesDirPath); - flake.config.lib.evalModules = args @ { + evalModules = args @ { packageSets, modules, # If set, returns the result coming form nixpkgs.lib.evalModules as is, @@ -67,15 +63,16 @@ modules = args.modules ++ [ - self.modules.dream2nix.core + dream2nix.modules.dream2nix.core ]; specialArgs = specialArgs // { inherit packageSets; - dream2nix.modules.dream2nix = self.modules.dream2nix; - dream2nix.overrides = self.overrides; - dream2nix.lib.evalModules = self.lib.evalModules; + dream2nix.modules.dream2nix = dream2nix.modules.dream2nix; + dream2nix.overrides = dream2nix.overrides; + dream2nix.lib.evalModules = evalModules; + dream2nix.inputs = dream2nix.inputs; }; } ); diff --git a/lib/internal b/lib/internal deleted file mode 120000 index d3bd0462..00000000 --- a/lib/internal +++ /dev/null @@ -1 +0,0 @@ -../modules/flake-parts/lib/internal \ No newline at end of file diff --git a/modules/flake-parts/lib/internal/dreamLockUtils.nix b/lib/internal/dreamLockUtils.nix similarity index 100% rename from modules/flake-parts/lib/internal/dreamLockUtils.nix rename to lib/internal/dreamLockUtils.nix diff --git a/modules/flake-parts/lib/internal/fetchDreamLockSources.nix b/lib/internal/fetchDreamLockSources.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchDreamLockSources.nix rename to lib/internal/fetchDreamLockSources.nix diff --git a/modules/flake-parts/lib/internal/fetchers/archive/default.nix b/lib/internal/fetchers/archive/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/archive/default.nix rename to lib/internal/fetchers/archive/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/crates-io/default.nix b/lib/internal/fetchers/crates-io/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/crates-io/default.nix rename to lib/internal/fetchers/crates-io/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/extractSource.nix b/lib/internal/fetchers/extractSource.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/extractSource.nix rename to lib/internal/fetchers/extractSource.nix diff --git a/modules/flake-parts/lib/internal/fetchers/git/default.nix b/lib/internal/fetchers/git/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/git/default.nix rename to lib/internal/fetchers/git/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/github/default.nix b/lib/internal/fetchers/github/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/github/default.nix rename to lib/internal/fetchers/github/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/gitlab/default.nix b/lib/internal/fetchers/gitlab/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/gitlab/default.nix rename to lib/internal/fetchers/gitlab/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/http/default.nix b/lib/internal/fetchers/http/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/http/default.nix rename to lib/internal/fetchers/http/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/npm/default.nix b/lib/internal/fetchers/npm/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/npm/default.nix rename to lib/internal/fetchers/npm/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/path/default.nix b/lib/internal/fetchers/path/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/path/default.nix rename to lib/internal/fetchers/path/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/pypi-sdist/default.nix b/lib/internal/fetchers/pypi-sdist/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/pypi-sdist/default.nix rename to lib/internal/fetchers/pypi-sdist/default.nix diff --git a/modules/flake-parts/lib/internal/fetchers/pypi-wheel/default.nix b/lib/internal/fetchers/pypi-wheel/default.nix similarity index 100% rename from modules/flake-parts/lib/internal/fetchers/pypi-wheel/default.nix rename to lib/internal/fetchers/pypi-wheel/default.nix diff --git a/modules/flake-parts/lib/internal/findCycles.nix b/lib/internal/findCycles.nix similarity index 100% rename from modules/flake-parts/lib/internal/findCycles.nix rename to lib/internal/findCycles.nix diff --git a/modules/flake-parts/lib/internal/getDreamLockSource.nix b/lib/internal/getDreamLockSource.nix similarity index 100% rename from modules/flake-parts/lib/internal/getDreamLockSource.nix rename to lib/internal/getDreamLockSource.nix diff --git a/modules/flake-parts/lib/internal/graphUtils.nix b/lib/internal/graphUtils.nix similarity index 100% rename from modules/flake-parts/lib/internal/graphUtils.nix rename to lib/internal/graphUtils.nix diff --git a/modules/flake-parts/lib/internal/hashFile.nix b/lib/internal/hashFile.nix similarity index 100% rename from modules/flake-parts/lib/internal/hashFile.nix rename to lib/internal/hashFile.nix diff --git a/modules/flake-parts/lib/internal/hashPath.nix b/lib/internal/hashPath.nix similarity index 100% rename from modules/flake-parts/lib/internal/hashPath.nix rename to lib/internal/hashPath.nix diff --git a/modules/flake-parts/lib/internal/nodejsLockUtils.nix b/lib/internal/nodejsLockUtils.nix similarity index 100% rename from modules/flake-parts/lib/internal/nodejsLockUtils.nix rename to lib/internal/nodejsLockUtils.nix diff --git a/modules/flake-parts/lib/internal/nodejsUtils.nix b/lib/internal/nodejsUtils.nix similarity index 100% rename from modules/flake-parts/lib/internal/nodejsUtils.nix rename to lib/internal/nodejsUtils.nix diff --git a/modules/flake-parts/lib/internal/parseSpdxId.nix b/lib/internal/parseSpdxId.nix similarity index 100% rename from modules/flake-parts/lib/internal/parseSpdxId.nix rename to lib/internal/parseSpdxId.nix diff --git a/modules/flake-parts/lib/internal/php-semver.nix b/lib/internal/php-semver.nix similarity index 100% rename from modules/flake-parts/lib/internal/php-semver.nix rename to lib/internal/php-semver.nix diff --git a/modules/flake-parts/lib/internal/prepareSourceTree.nix b/lib/internal/prepareSourceTree.nix similarity index 100% rename from modules/flake-parts/lib/internal/prepareSourceTree.nix rename to lib/internal/prepareSourceTree.nix diff --git a/modules/flake-parts/lib/internal/readDreamLock.nix b/lib/internal/readDreamLock.nix similarity index 100% rename from modules/flake-parts/lib/internal/readDreamLock.nix rename to lib/internal/readDreamLock.nix diff --git a/modules/flake-parts/lib/internal/sanitizePath.nix b/lib/internal/sanitizePath.nix similarity index 100% rename from modules/flake-parts/lib/internal/sanitizePath.nix rename to lib/internal/sanitizePath.nix diff --git a/modules/flake-parts/lib/internal/sanitizeRelativePath.nix b/lib/internal/sanitizeRelativePath.nix similarity index 100% rename from modules/flake-parts/lib/internal/sanitizeRelativePath.nix rename to lib/internal/sanitizeRelativePath.nix diff --git a/modules/flake-parts/lib/internal/simpleTranslate.nix b/lib/internal/simpleTranslate.nix similarity index 100% rename from modules/flake-parts/lib/internal/simpleTranslate.nix rename to lib/internal/simpleTranslate.nix diff --git a/modules/flake-parts/lib/internal/simpleTranslate2.nix b/lib/internal/simpleTranslate2.nix similarity index 100% rename from modules/flake-parts/lib/internal/simpleTranslate2.nix rename to lib/internal/simpleTranslate2.nix diff --git a/modules/flake-parts/lib/internal/toTOML.nix b/lib/internal/toTOML.nix similarity index 100% rename from modules/flake-parts/lib/internal/toTOML.nix rename to lib/internal/toTOML.nix diff --git a/lib/types b/lib/types deleted file mode 120000 index 6bf4095b..00000000 --- a/lib/types +++ /dev/null @@ -1 +0,0 @@ -../modules/flake-parts/lib/types/ \ No newline at end of file diff --git a/modules/flake-parts/lib/types/default.nix b/lib/types/default.nix similarity index 100% rename from modules/flake-parts/lib/types/default.nix rename to lib/types/default.nix diff --git a/modules/dream2nix/WIP-nodejs-builder-v3/default.nix b/modules/dream2nix/WIP-nodejs-builder-v3/default.nix index 78e95765..54de9c72 100644 --- a/modules/dream2nix/WIP-nodejs-builder-v3/default.nix +++ b/modules/dream2nix/WIP-nodejs-builder-v3/default.nix @@ -9,7 +9,7 @@ inherit (config.deps) fetchurl; - nodejsLockUtils = import ../../flake-parts/lib/internal/nodejsLockUtils.nix {inherit lib;}; + nodejsLockUtils = import ../../../lib/internal/nodejsLockUtils.nix {inherit lib;}; isLink = plent: plent ? link && plent.link; diff --git a/modules/dream2nix/WIP-nodejs-builder-v3/types.nix b/modules/dream2nix/WIP-nodejs-builder-v3/types.nix index 7f7b1b27..67187e65 100644 --- a/modules/dream2nix/WIP-nodejs-builder-v3/types.nix +++ b/modules/dream2nix/WIP-nodejs-builder-v3/types.nix @@ -10,7 +10,7 @@ l = lib // builtins; t = l.types; - dreamTypes = import ../../flake-parts/lib/types { + dreamTypes = import ../../../lib/types { inherit dream2nix lib specialArgs; }; diff --git a/modules/dream2nix/buildRustPackage/default.nix b/modules/dream2nix/buildRustPackage/default.nix index ddf6dd6c..53a34035 100644 --- a/modules/dream2nix/buildRustPackage/default.nix +++ b/modules/dream2nix/buildRustPackage/default.nix @@ -11,31 +11,31 @@ sourceRoot = config.mkDerivation.src; fetchDreamLockSources = - import ../../flake-parts/lib/internal/fetchDreamLockSources.nix + import ../../../lib/internal/fetchDreamLockSources.nix {inherit lib;}; - getDreamLockSource = import ../../flake-parts/lib/internal/getDreamLockSource.nix {inherit lib;}; - readDreamLock = import ../../flake-parts/lib/internal/readDreamLock.nix {inherit lib;}; - hashPath = import ../../flake-parts/lib/internal/hashPath.nix { + getDreamLockSource = import ../../../lib/internal/getDreamLockSource.nix {inherit lib;}; + readDreamLock = import ../../../lib/internal/readDreamLock.nix {inherit lib;}; + hashPath = import ../../../lib/internal/hashPath.nix { inherit lib; inherit (config.deps) runCommandLocal nix; }; - hashFile = import ../../flake-parts/lib/internal/hashFile.nix { + hashFile = import ../../../lib/internal/hashFile.nix { inherit lib; inherit (config.deps) runCommandLocal nix; }; # fetchers fetchers = { - git = import ../../flake-parts/lib/internal/fetchers/git { + git = import ../../../lib/internal/fetchers/git { inherit hashPath; inherit (config.deps) fetchgit; }; - http = import ../../flake-parts/lib/internal/fetchers/http { + http = import ../../../lib/internal/fetchers/http { inherit hashFile lib; inherit (config.deps.stdenv) mkDerivation; inherit (config.deps) fetchurl; }; - crates-io = import ../../flake-parts/lib/internal/fetchers/crates-io { + crates-io = import ../../../lib/internal/fetchers/crates-io { inherit hashFile; inherit (config.deps) fetchurl runCommandLocal; }; @@ -71,7 +71,7 @@ defaultPackageVersion ; - toTOML = import ../../flake-parts/lib/internal/toTOML.nix {inherit lib;}; + toTOML = import ../../../lib/internal/toTOML.nix {inherit lib;}; utils = import ./utils.nix { inherit dreamLock getSource lib toTOML sourceRoot; diff --git a/modules/dream2nix/mkDerivation/interface.nix b/modules/dream2nix/mkDerivation/interface.nix index 04cd718f..bae8d433 100644 --- a/modules/dream2nix/mkDerivation/interface.nix +++ b/modules/dream2nix/mkDerivation/interface.nix @@ -10,7 +10,7 @@ common-options = import ../builtins-derivation/derivation-common/options.nix {inherit lib;}; - dreamTypes = import ../../flake-parts/lib/types { + dreamTypes = import ../../../lib/types { inherit dream2nix lib specialArgs; }; diff --git a/modules/dream2nix/multi-derivation-package/interface.nix b/modules/dream2nix/multi-derivation-package/interface.nix index 43ef47aa..dd116626 100644 --- a/modules/dream2nix/multi-derivation-package/interface.nix +++ b/modules/dream2nix/multi-derivation-package/interface.nix @@ -6,7 +6,7 @@ ... }: let t = lib.types; - dreamTypes = import ../../flake-parts/lib/types { + dreamTypes = import ../../../lib/types { inherit dream2nix lib specialArgs; }; in { diff --git a/modules/dream2nix/nodejs-granular-v3/default.nix b/modules/dream2nix/nodejs-granular-v3/default.nix index 8d19ba8b..ce6236c6 100644 --- a/modules/dream2nix/nodejs-granular-v3/default.nix +++ b/modules/dream2nix/nodejs-granular-v3/default.nix @@ -8,12 +8,12 @@ cfg = config.nodejs-granular-v3; - extractSource = import ../../flake-parts/lib/internal/fetchers/extractSource.nix { + extractSource = import ../../../lib/internal/fetchers/extractSource.nix { inherit lib; inherit (config.deps.stdenv) mkDerivation; }; - findCycles = import ../../flake-parts/lib/internal/findCycles.nix { + findCycles = import ../../../lib/internal/findCycles.nix { inherit lib; }; diff --git a/modules/dream2nix/nodejs-granular/default.nix b/modules/dream2nix/nodejs-granular/default.nix index 89a1f4a4..29a338e4 100644 --- a/modules/dream2nix/nodejs-granular/default.nix +++ b/modules/dream2nix/nodejs-granular/default.nix @@ -9,26 +9,26 @@ cfg = config.nodejs-granular; fetchDreamLockSources = - import ../../flake-parts/lib/internal/fetchDreamLockSources.nix + import ../../../lib/internal/fetchDreamLockSources.nix {inherit lib;}; - getDreamLockSource = import ../../flake-parts/lib/internal/getDreamLockSource.nix {inherit lib;}; - readDreamLock = import ../../flake-parts/lib/internal/readDreamLock.nix {inherit lib;}; - hashPath = import ../../flake-parts/lib/internal/hashPath.nix { + getDreamLockSource = import ../../../lib/internal/getDreamLockSource.nix {inherit lib;}; + readDreamLock = import ../../../lib/internal/readDreamLock.nix {inherit lib;}; + hashPath = import ../../../lib/internal/hashPath.nix { inherit lib; inherit (config.deps) runCommandLocal nix; }; - hashFile = import ../../flake-parts/lib/internal/hashFile.nix { + hashFile = import ../../../lib/internal/hashFile.nix { inherit lib; inherit (config.deps) runCommandLocal nix; }; # fetchers fetchers = { - git = import ../../flake-parts/lib/internal/fetchers/git { + git = import ../../../lib/internal/fetchers/git { inherit hashPath; inherit (config.deps) fetchgit; }; - http = import ../../flake-parts/lib/internal/fetchers/http { + http = import ../../../lib/internal/fetchers/http { inherit hashFile lib; inherit (config.deps.stdenv) mkDerivation; inherit (config.deps) fetchurl; diff --git a/modules/dream2nix/nodejs-package-lock-v3/default.nix b/modules/dream2nix/nodejs-package-lock-v3/default.nix index 7147966b..07859899 100644 --- a/modules/dream2nix/nodejs-package-lock-v3/default.nix +++ b/modules/dream2nix/nodejs-package-lock-v3/default.nix @@ -9,7 +9,7 @@ inherit (config.deps) fetchurl; - nodejsLockUtils = import ../../flake-parts/lib/internal/nodejsLockUtils.nix {inherit lib;}; + nodejsLockUtils = import ../../../lib/internal/nodejsLockUtils.nix {inherit lib;}; isLink = plent: plent ? link && plent.link; diff --git a/modules/dream2nix/nodejs-package-lock-v3/interface.nix b/modules/dream2nix/nodejs-package-lock-v3/interface.nix index b2dab188..5004dbfb 100644 --- a/modules/dream2nix/nodejs-package-lock-v3/interface.nix +++ b/modules/dream2nix/nodejs-package-lock-v3/interface.nix @@ -14,7 +14,7 @@ t = l.types; cfg = config.nodejs-package-lock-v3; - dreamTypes = import ../../flake-parts/lib/types { + dreamTypes = import ../../../lib/types { inherit dream2nix lib specialArgs; }; diff --git a/modules/dream2nix/nodejs-package-lock/default.nix b/modules/dream2nix/nodejs-package-lock/default.nix index 2d614bb1..9d12fd03 100644 --- a/modules/dream2nix/nodejs-package-lock/default.nix +++ b/modules/dream2nix/nodejs-package-lock/default.nix @@ -7,10 +7,10 @@ l = lib // builtins; cfg = config.nodejs-package-lock; - nodejsUtils = import ../../flake-parts/lib/internal/nodejsUtils.nix {inherit lib parseSpdxId;}; - parseSpdxId = import ../../flake-parts/lib/internal/parseSpdxId.nix {inherit lib;}; - prepareSourceTree = import ../../flake-parts/lib/internal/prepareSourceTree.nix {inherit lib;}; - simpleTranslate = import ../../flake-parts/lib/internal/simpleTranslate.nix {inherit lib;}; + nodejsUtils = import ../../../lib/internal/nodejsUtils.nix {inherit lib parseSpdxId;}; + parseSpdxId = import ../../../lib/internal/parseSpdxId.nix {inherit lib;}; + prepareSourceTree = import ../../../lib/internal/prepareSourceTree.nix {inherit lib;}; + simpleTranslate = import ../../../lib/internal/simpleTranslate.nix {inherit lib;}; translate = import ./translate.nix { inherit lib nodejsUtils parseSpdxId simpleTranslate; diff --git a/modules/dream2nix/php-composer-lock/default.nix b/modules/dream2nix/php-composer-lock/default.nix index f39ade34..bea5417a 100644 --- a/modules/dream2nix/php-composer-lock/default.nix +++ b/modules/dream2nix/php-composer-lock/default.nix @@ -7,11 +7,11 @@ l = lib // builtins; cfg = config.php-composer-lock; - dreamLockUtils = import ../../flake-parts/lib/internal/dreamLockUtils.nix {inherit lib;}; - nodejsUtils = import ../../flake-parts/lib/internal/nodejsUtils.nix {inherit lib parseSpdxId;}; - parseSpdxId = import ../../flake-parts/lib/internal/parseSpdxId.nix {inherit lib;}; - prepareSourceTree = import ../../flake-parts/lib/internal/prepareSourceTree.nix {inherit lib;}; - simpleTranslate2 = import ../../flake-parts/lib/internal/simpleTranslate2.nix {inherit lib;}; + dreamLockUtils = import ../../../lib/internal/dreamLockUtils.nix {inherit lib;}; + nodejsUtils = import ../../../lib/internal/nodejsUtils.nix {inherit lib parseSpdxId;}; + parseSpdxId = import ../../../lib/internal/parseSpdxId.nix {inherit lib;}; + prepareSourceTree = import ../../../lib/internal/prepareSourceTree.nix {inherit lib;}; + simpleTranslate2 = import ../../../lib/internal/simpleTranslate2.nix {inherit lib;}; translate = import ./translate.nix { inherit lib dreamLockUtils nodejsUtils parseSpdxId simpleTranslate2; diff --git a/modules/dream2nix/php-composer-lock/translate.nix b/modules/dream2nix/php-composer-lock/translate.nix index f4c861da..6c122d0b 100644 --- a/modules/dream2nix/php-composer-lock/translate.nix +++ b/modules/dream2nix/php-composer-lock/translate.nix @@ -17,7 +17,7 @@ ... }: let inherit - (import ../../flake-parts/lib/internal/php-semver.nix {inherit lib;}) + (import ../../../lib/internal/php-semver.nix {inherit lib;}) satisfies multiSatisfies ; diff --git a/modules/dream2nix/php-granular/default.nix b/modules/dream2nix/php-granular/default.nix index 12d50ebe..5318fd73 100644 --- a/modules/dream2nix/php-granular/default.nix +++ b/modules/dream2nix/php-granular/default.nix @@ -11,22 +11,22 @@ dreamLock = config.php-composer-lock.dreamLock; fetchDreamLockSources = - import ../../flake-parts/lib/internal/fetchDreamLockSources.nix + import ../../../lib/internal/fetchDreamLockSources.nix {inherit lib;}; - getDreamLockSource = import ../../flake-parts/lib/internal/getDreamLockSource.nix {inherit lib;}; - readDreamLock = import ../../flake-parts/lib/internal/readDreamLock.nix {inherit lib;}; - hashPath = import ../../flake-parts/lib/internal/hashPath.nix { + getDreamLockSource = import ../../../lib/internal/getDreamLockSource.nix {inherit lib;}; + readDreamLock = import ../../../lib/internal/readDreamLock.nix {inherit lib;}; + hashPath = import ../../../lib/internal/hashPath.nix { inherit lib; inherit (config.deps) runCommandLocal nix; }; # fetchers fetchers = { - git = import ../../flake-parts/lib/internal/fetchers/git { + git = import ../../../lib/internal/fetchers/git { inherit hashPath; inherit (config.deps) fetchgit; }; - path = import ../../flake-parts/lib/internal/fetchers/path { + path = import ../../../lib/internal/fetchers/path { inherit hashPath; }; }; @@ -53,7 +53,7 @@ packageVersions ; - inherit (import ../../flake-parts/lib/internal/php-semver.nix {inherit lib;}) satisfies; + inherit (import ../../../lib/internal/php-semver.nix {inherit lib;}) satisfies; selectExtensions = all: l.attrValues ( diff --git a/modules/dream2nix/rust-cargo-lock/default.nix b/modules/dream2nix/rust-cargo-lock/default.nix index 48f55be8..fe65fda0 100644 --- a/modules/dream2nix/rust-cargo-lock/default.nix +++ b/modules/dream2nix/rust-cargo-lock/default.nix @@ -6,11 +6,11 @@ }: let l = lib // builtins; cfg = config.rust-cargo-lock; - parseSpdxId = import ../../flake-parts/lib/internal/parseSpdxId.nix {inherit lib;}; - sanitizePath = import ../../flake-parts/lib/internal/sanitizePath.nix {inherit lib;}; - sanitizeRelativePath = import ../../flake-parts/lib/internal/sanitizeRelativePath.nix {inherit lib;}; - prepareSourceTree = import ../../flake-parts/lib/internal/prepareSourceTree.nix {inherit lib;}; - simpleTranslate2 = import ../../flake-parts/lib/internal/simpleTranslate2.nix {inherit lib;}; + parseSpdxId = import ../../../lib/internal/parseSpdxId.nix {inherit lib;}; + sanitizePath = import ../../../lib/internal/sanitizePath.nix {inherit lib;}; + sanitizeRelativePath = import ../../../lib/internal/sanitizeRelativePath.nix {inherit lib;}; + prepareSourceTree = import ../../../lib/internal/prepareSourceTree.nix {inherit lib;}; + simpleTranslate2 = import ../../../lib/internal/simpleTranslate2.nix {inherit lib;}; translate = import ./translate.nix { inherit lib parseSpdxId sanitizePath sanitizeRelativePath simpleTranslate2; diff --git a/modules/dream2nix/rust-crane/default.nix b/modules/dream2nix/rust-crane/default.nix index 1a1d96c0..421d3338 100644 --- a/modules/dream2nix/rust-crane/default.nix +++ b/modules/dream2nix/rust-crane/default.nix @@ -13,30 +13,30 @@ sourceRoot = config.mkDerivation.src; fetchDreamLockSources = - import ../../flake-parts/lib/internal/fetchDreamLockSources.nix + import ../../../lib/internal/fetchDreamLockSources.nix {inherit lib;}; - getDreamLockSource = import ../../flake-parts/lib/internal/getDreamLockSource.nix {inherit lib;}; - readDreamLock = import ../../flake-parts/lib/internal/readDreamLock.nix {inherit lib;}; - hashPath = import ../../flake-parts/lib/internal/hashPath.nix { + getDreamLockSource = import ../../../lib/internal/getDreamLockSource.nix {inherit lib;}; + readDreamLock = import ../../../lib/internal/readDreamLock.nix {inherit lib;}; + hashPath = import ../../../lib/internal/hashPath.nix { inherit lib; inherit (config.deps) runCommandLocal nix; }; - hashFile = import ../../flake-parts/lib/internal/hashFile.nix { + hashFile = import ../../../lib/internal/hashFile.nix { inherit lib; inherit (config.deps) runCommandLocal nix; }; # fetchers fetchers = { - git = import ../../flake-parts/lib/internal/fetchers/git { + git = import ../../../lib/internal/fetchers/git { inherit hashPath; inherit (config.deps) fetchgit; }; - crates-io = import ../../flake-parts/lib/internal/fetchers/crates-io { + crates-io = import ../../../lib/internal/fetchers/crates-io { inherit hashFile; inherit (config.deps) fetchurl runCommandLocal; }; - path = import ../../flake-parts/lib/internal/fetchers/path { + path = import ../../../lib/internal/fetchers/path { inherit hashPath; }; }; @@ -60,7 +60,7 @@ getSource = getDreamLockSource fetchedSources; - toTOML = import ../../flake-parts/lib/internal/toTOML.nix {inherit lib;}; + toTOML = import ../../../lib/internal/toTOML.nix {inherit lib;}; utils = import ./utils.nix { inherit dreamLock getSource lib toTOML sourceRoot; diff --git a/tests/nix-unit/test_findCycles/default.nix b/tests/nix-unit/test_findCycles/default.nix index af136884..f0f98399 100644 --- a/tests/nix-unit/test_findCycles/default.nix +++ b/tests/nix-unit/test_findCycles/default.nix @@ -3,7 +3,7 @@ lib ? import , ... }: let - findCycles = import ../../../modules/flake-parts/lib/internal/findCycles.nix {inherit lib;}; + findCycles = import ../../../lib/internal/findCycles.nix {inherit lib;}; in { test_simple = { expr = findCycles { diff --git a/tests/nix-unit/test_graph_utils/sanitizeGraph.nix b/tests/nix-unit/test_graph_utils/sanitizeGraph.nix index 7d51d915..800ae304 100644 --- a/tests/nix-unit/test_graph_utils/sanitizeGraph.nix +++ b/tests/nix-unit/test_graph_utils/sanitizeGraph.nix @@ -1,5 +1,5 @@ {lib ? import , ...}: let - util = import ../../../modules/flake-parts/lib/internal/graphUtils.nix {inherit lib;}; + util = import ../../../lib/internal/graphUtils.nix {inherit lib;}; in { test_simple = { expr = util.sanitizeGraph { diff --git a/tests/nix-unit/test_groups_multi_derivation_package/default.nix b/tests/nix-unit/test_groups_multi_derivation_package/default.nix index 950b0fa2..61a430cb 100644 --- a/tests/nix-unit/test_groups_multi_derivation_package/default.nix +++ b/tests/nix-unit/test_groups_multi_derivation_package/default.nix @@ -22,7 +22,7 @@ specialArgs, ... }: let - dreamTypes = import ../../../modules/flake-parts/lib/types { + dreamTypes = import ../../../lib/types { inherit dream2nix lib specialArgs; }; in { diff --git a/tests/nix-unit/test_nodejs_lockutils/default.nix b/tests/nix-unit/test_nodejs_lockutils/default.nix index 80e89ae6..9c5ce37b 100644 --- a/tests/nix-unit/test_nodejs_lockutils/default.nix +++ b/tests/nix-unit/test_nodejs_lockutils/default.nix @@ -1,7 +1,7 @@ { # pkgs ? import {}, lib ? import , - nodejsLockUtils ? import ../../../modules/flake-parts/lib/internal/nodejsLockUtils.nix {inherit lib;}, + nodejsLockUtils ? import ../../../lib/internal/nodejsLockUtils.nix {inherit lib;}, }: { # test the path strip function test_nodejsLockUtils_stripPath_simple = let