From 736b5d5913e8421338018e734ffc3d42e8ce9427 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Sun, 11 Aug 2024 19:18:56 -0700 Subject: [PATCH] lix-doc: move under src/ This is required to make more meson stuff easier/possible, and honestly it *is* now Lix sources anyhow. Change-Id: Ia6c38fabce9aa5c53768745ee38c5cf344f5c226 --- meson.build | 1 - package.nix | 3 +-- {lix-doc => src/lix-doc}/.gitignore | 0 {lix-doc => src/lix-doc}/Cargo.lock | 0 {lix-doc => src/lix-doc}/Cargo.toml | 0 {lix-doc => src/lix-doc}/README.md | 0 {lix-doc => src/lix-doc}/meson.build | 0 src/lix-doc/package.nix | 8 ++++++++ {lix-doc => src/lix-doc}/src/lib.rs | 0 {lix-doc => src/lix-doc}/src/pprint.rs | 0 src/meson.build | 1 + 11 files changed, 10 insertions(+), 3 deletions(-) rename {lix-doc => src/lix-doc}/.gitignore (100%) rename {lix-doc => src/lix-doc}/Cargo.lock (100%) rename {lix-doc => src/lix-doc}/Cargo.toml (100%) rename {lix-doc => src/lix-doc}/README.md (100%) rename {lix-doc => src/lix-doc}/meson.build (100%) create mode 100644 src/lix-doc/package.nix rename {lix-doc => src/lix-doc}/src/lib.rs (100%) rename {lix-doc => src/lix-doc}/src/pprint.rs (100%) diff --git a/meson.build b/meson.build index 4711e0087..bcf0d06bc 100644 --- a/meson.build +++ b/meson.build @@ -554,7 +554,6 @@ if is_darwin ) endif -subdir('lix-doc') subdir('src') subdir('scripts') subdir('misc') diff --git a/package.nix b/package.nix index af542cdf5..a678e3dbd 100644 --- a/package.nix +++ b/package.nix @@ -135,7 +135,6 @@ let ./meson.build ./meson.options ./meson - ./lix-doc ./scripts/meson.build ./subprojects ]); @@ -289,7 +288,7 @@ stdenv.mkDerivation (finalAttrs: { BOOST_LIBRARYDIR = "${lib.getLib boost}/lib"; }; - cargoDeps = rustPlatform.importCargoLock { lockFile = ./lix-doc/Cargo.lock; }; + cargoDeps = rustPlatform.importCargoLock { lockFile = ./src/lix-doc/Cargo.lock; }; preConfigure = lib.optionalString (!finalAttrs.dontBuild && !hostPlatform.isStatic) '' diff --git a/lix-doc/.gitignore b/src/lix-doc/.gitignore similarity index 100% rename from lix-doc/.gitignore rename to src/lix-doc/.gitignore diff --git a/lix-doc/Cargo.lock b/src/lix-doc/Cargo.lock similarity index 100% rename from lix-doc/Cargo.lock rename to src/lix-doc/Cargo.lock diff --git a/lix-doc/Cargo.toml b/src/lix-doc/Cargo.toml similarity index 100% rename from lix-doc/Cargo.toml rename to src/lix-doc/Cargo.toml diff --git a/lix-doc/README.md b/src/lix-doc/README.md similarity index 100% rename from lix-doc/README.md rename to src/lix-doc/README.md diff --git a/lix-doc/meson.build b/src/lix-doc/meson.build similarity index 100% rename from lix-doc/meson.build rename to src/lix-doc/meson.build diff --git a/src/lix-doc/package.nix b/src/lix-doc/package.nix new file mode 100644 index 000000000..d3896e726 --- /dev/null +++ b/src/lix-doc/package.nix @@ -0,0 +1,8 @@ +{ rustPlatform, lib }: + +rustPlatform.buildRustPackage { + name = "lix-doc"; + + cargoLock.lockFile = ./Cargo.lock; + src = lib.cleanSource ./.; +} diff --git a/lix-doc/src/lib.rs b/src/lix-doc/src/lib.rs similarity index 100% rename from lix-doc/src/lib.rs rename to src/lix-doc/src/lib.rs diff --git a/lix-doc/src/pprint.rs b/src/lix-doc/src/pprint.rs similarity index 100% rename from lix-doc/src/pprint.rs rename to src/lix-doc/src/pprint.rs diff --git a/src/meson.build b/src/meson.build index e918ae392..66fbb13ba 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,4 +1,5 @@ # Subcomponents: these link into artifacts themselves, and have interdependencies. +subdir('lix-doc') subdir('libutil') # Load-bearing order. libstore depends on libutil.