From 59e0bf6e570bb5461b0f3a1f62b15165e37a08a9 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 7 Aug 2023 23:11:31 +0300 Subject: [PATCH] nix: cleanup (#75) * dev: typo in cache job name * nix: cleanup --- .github/workflows/cachix.yml | 3 ++- nix/default.nix | 14 ++++++++------ nix/plugins/default.nix | 8 +++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index a42ba16..0d34cc2 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -11,7 +11,7 @@ on: - README.md jobs: - cahix: + cachix: runs-on: ubuntu-latest strategy: matrix: @@ -25,6 +25,7 @@ jobs: - shell - stdin - symbols + - websearch steps: - uses: easimon/maximize-build-space@v6 with: diff --git a/nix/default.nix b/nix/default.nix index 7f2434d..81cb5fa 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -18,9 +18,8 @@ cargoToml = builtins.fromTOML (builtins.readFile ../anyrun/Cargo.toml); in rustPlatform.buildRustPackage rec { - name = cargoToml.package.name; - pname = "anyrun"; - #inherit version; + pname = cargoToml.package.name; + version = cargoToml.package.version; src = ../.; @@ -34,7 +33,7 @@ in ]; cargoLock = { - lockFile = lockFile; + inherit lockFile; }; checkInputs = [cargo rustc]; @@ -49,14 +48,17 @@ in cargoBuildFlags = if dontBuildPlugins - then ["-p ${name}"] + then ["-p ${pname}"] else []; doCheck = true; CARGO_BUILD_INCREMENTAL = "false"; RUST_BACKTRACE = "full"; copyLibs = true; - buildAndTestSubdir = if dontBuildPlugins then name else null; + buildAndTestSubdir = + if dontBuildPlugins + then pname + else null; postInstall = '' wrapProgram $out/bin/anyrun \ diff --git a/nix/plugins/default.nix b/nix/plugins/default.nix index d098155..cca1f64 100644 --- a/nix/plugins/default.nix +++ b/nix/plugins/default.nix @@ -16,11 +16,13 @@ cargoToml = builtins.fromTOML (builtins.readFile ../../plugins/${name}/Cargo.toml); in rustPlatform.buildRustPackage { - pname = name; - name = cargoToml.package.name; + pname = cargoToml.package.name; + version = cargoToml.package.version; src = "${inputs.self}"; - cargoLock.lockFile = lockFile; + cargoLock = { + inherit lockFile; + }; buildInputs = [ glib