From 72768e3be022c15f2c12609c78c662646f2273f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 13 Oct 2024 22:24:30 +0200 Subject: [PATCH 1/2] Symlink readme and license files instead --- fixx/LICENSE-APACHE | 1 + fixx/LICENSE-MIT | 1 + fixx/README.md | 1 + fixx/derivation.nix | 4 ---- 4 files changed, 3 insertions(+), 4 deletions(-) create mode 120000 fixx/LICENSE-APACHE create mode 120000 fixx/LICENSE-MIT create mode 120000 fixx/README.md diff --git a/fixx/LICENSE-APACHE b/fixx/LICENSE-APACHE new file mode 120000 index 0000000..965b606 --- /dev/null +++ b/fixx/LICENSE-APACHE @@ -0,0 +1 @@ +../LICENSE-APACHE \ No newline at end of file diff --git a/fixx/LICENSE-MIT b/fixx/LICENSE-MIT new file mode 120000 index 0000000..76219eb --- /dev/null +++ b/fixx/LICENSE-MIT @@ -0,0 +1 @@ +../LICENSE-MIT \ No newline at end of file diff --git a/fixx/README.md b/fixx/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/fixx/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/fixx/derivation.nix b/fixx/derivation.nix index 1330965..31f80e2 100644 --- a/fixx/derivation.nix +++ b/fixx/derivation.nix @@ -15,10 +15,6 @@ rustPlatform.buildRustPackage rec { src = lib.cleanSource ../.; cargoLock = import ../lockfile.nix; - postPatch = '' - cp README.md LICENSE-{APACHE,MIT} fixx - ''; - nativeBuildInputs = [ binaryen rustc.llvmPackages.lld From 5da4d275c2756ba420da3f8f2a64e8c5a2dba1c8 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 14 Oct 2024 11:08:46 +0200 Subject: [PATCH 2/2] libixx: add derivation --- .github/workflows/ci.yaml | 2 +- flake.nix | 1 + libixx/derivation.nix | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 libixx/derivation.nix diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f72a66..970e596 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - module: [ ixx, fixx ] + module: [ libixx, ixx, fixx ] steps: - uses: actions/checkout@v4 diff --git a/flake.nix b/flake.nix index 09a074d..9eb5e58 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,7 @@ packages = { ixx = pkgs.callPackage ./ixx/derivation.nix { }; fixx = pkgs.callPackage ./fixx/derivation.nix { }; + libixx = pkgs.callPackage ./libixx/derivation.nix { }; }; } ); diff --git a/libixx/derivation.nix b/libixx/derivation.nix new file mode 100644 index 0000000..6059ec2 --- /dev/null +++ b/libixx/derivation.nix @@ -0,0 +1,15 @@ +{ lib, rustPlatform }: + +let + manifest = (lib.importTOML ./Cargo.toml).package; +in +rustPlatform.buildRustPackage rec { + pname = "libixx"; + inherit (manifest) version; + + src = lib.cleanSource ../.; + cargoLock = import ../lockfile.nix; + + cargoBuildFlags = "-p ${pname}"; + cargoTestFlags = "-p ${pname}"; +}