nix: cleanup (#75)

* dev: typo in cache job name

* nix: cleanup
This commit is contained in:
NotAShelf
2023-08-07 23:11:31 +03:00
committed by GitHub
parent e6129f6f84
commit 59e0bf6e57
3 changed files with 15 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ on:
- README.md - README.md
jobs: jobs:
cahix: cachix:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
@@ -25,6 +25,7 @@ jobs:
- shell - shell
- stdin - stdin
- symbols - symbols
- websearch
steps: steps:
- uses: easimon/maximize-build-space@v6 - uses: easimon/maximize-build-space@v6
with: with:

View File

@@ -18,9 +18,8 @@
cargoToml = builtins.fromTOML (builtins.readFile ../anyrun/Cargo.toml); cargoToml = builtins.fromTOML (builtins.readFile ../anyrun/Cargo.toml);
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
name = cargoToml.package.name; pname = cargoToml.package.name;
pname = "anyrun"; version = cargoToml.package.version;
#inherit version;
src = ../.; src = ../.;
@@ -34,7 +33,7 @@ in
]; ];
cargoLock = { cargoLock = {
lockFile = lockFile; inherit lockFile;
}; };
checkInputs = [cargo rustc]; checkInputs = [cargo rustc];
@@ -49,14 +48,17 @@ in
cargoBuildFlags = cargoBuildFlags =
if dontBuildPlugins if dontBuildPlugins
then ["-p ${name}"] then ["-p ${pname}"]
else []; else [];
doCheck = true; doCheck = true;
CARGO_BUILD_INCREMENTAL = "false"; CARGO_BUILD_INCREMENTAL = "false";
RUST_BACKTRACE = "full"; RUST_BACKTRACE = "full";
copyLibs = true; copyLibs = true;
buildAndTestSubdir = if dontBuildPlugins then name else null; buildAndTestSubdir =
if dontBuildPlugins
then pname
else null;
postInstall = '' postInstall = ''
wrapProgram $out/bin/anyrun \ wrapProgram $out/bin/anyrun \

View File

@@ -16,11 +16,13 @@
cargoToml = builtins.fromTOML (builtins.readFile ../../plugins/${name}/Cargo.toml); cargoToml = builtins.fromTOML (builtins.readFile ../../plugins/${name}/Cargo.toml);
in in
rustPlatform.buildRustPackage { rustPlatform.buildRustPackage {
pname = name; pname = cargoToml.package.name;
name = cargoToml.package.name; version = cargoToml.package.version;
src = "${inputs.self}"; src = "${inputs.self}";
cargoLock.lockFile = lockFile; cargoLock = {
inherit lockFile;
};
buildInputs = [ buildInputs = [
glib glib