tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
corrosion: init at unstable-2021-02-23
Robert Schütz
4 years ago
27d93530
97904f84
+74
3 changed files
expand all
collapse all
unified
split
pkgs
development
tools
build-managers
corrosion
cmake-install-full-dir.patch
default.nix
top-level
all-packages.nix
+18
pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/cmake/CorrosionConfig.cmake.in b/cmake/CorrosionConfig.cmake.in
2
+
index c042a00..491f53c 100644
3
+
--- a/cmake/CorrosionConfig.cmake.in
4
+
+++ b/cmake/CorrosionConfig.cmake.in
5
+
@@ -4,11 +4,11 @@ if (Corrosion_FOUND)
6
+
return()
7
+
endif()
8
+
9
+
-list(APPEND CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_DATADIR@/cmake")
10
+
+list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_FULL_DATADIR@/cmake")
11
+
12
+
add_executable(Corrosion::Generator IMPORTED GLOBAL)
13
+
set_property(
14
+
TARGET Corrosion::Generator
15
+
- PROPERTY IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_LIBEXECDIR@/corrosion-generator")
16
+
+ PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_FULL_LIBEXECDIR@/corrosion-generator")
17
+
18
+
include(Corrosion)
+54
pkgs/development/tools/build-managers/corrosion/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ lib
2
+
, stdenv
3
+
, fetchFromGitHub
4
+
, cmake
5
+
, rustPlatform
6
+
}:
7
+
8
+
stdenv.mkDerivation rec {
9
+
pname = "corrosion";
10
+
version = "unstable-2021-02-23";
11
+
12
+
src = fetchFromGitHub {
13
+
owner = "AndrewGaspar";
14
+
repo = "corrosion";
15
+
rev = "e6c35c7e55a59c8223577b5abc4d253b4a82898b";
16
+
sha256 = "0vq6g3ggnqiln0q8gsr8rr5rrdgpfcgfly79jwcygxrviw37m44d";
17
+
};
18
+
19
+
patches = [
20
+
# https://github.com/AndrewGaspar/corrosion/issues/84
21
+
./cmake-install-full-dir.patch
22
+
];
23
+
24
+
cargoRoot = "generator";
25
+
26
+
cargoDeps = rustPlatform.fetchCargoTarball {
27
+
inherit src;
28
+
sourceRoot = "${src.name}/${cargoRoot}";
29
+
name = "${pname}-${version}";
30
+
sha256 = "1fsq8zzzq28fj2fh92wmg8kmdj4y10mcpdmlgxsygy5lbh4xs13f";
31
+
};
32
+
33
+
nativeBuildInputs = [
34
+
cmake
35
+
] ++ (with rustPlatform; [
36
+
cargoSetupHook
37
+
rust.cargo
38
+
rust.rustc
39
+
]);
40
+
41
+
cmakeFlags = [
42
+
"-DRust_CARGO=${rustPlatform.rust.cargo}/bin/cargo"
43
+
44
+
# tests cannot find cargo because Rust_CARGO is unset before tests
45
+
"-DCORROSION_BUILD_TESTS=OFF"
46
+
];
47
+
48
+
meta = with lib; {
49
+
description = "Tool for integrating Rust into an existing CMake project";
50
+
homepage = "https://github.com/AndrewGaspar/corrosion";
51
+
license = licenses.mit;
52
+
maintainers = with maintainers; [ dotlambda ];
53
+
};
54
+
}
+2
pkgs/top-level/all-packages.nix
···
12312
12313
cookiecutter = with python3Packages; toPythonApplication cookiecutter;
12314
0
0
12315
corundum = callPackage ../development/tools/corundum { };
12316
12317
confluent-platform = callPackage ../servers/confluent-platform {};
···
12312
12313
cookiecutter = with python3Packages; toPythonApplication cookiecutter;
12314
12315
+
corrosion = callPackage ../development/tools/build-managers/corrosion { };
12316
+
12317
corundum = callPackage ../development/tools/corundum { };
12318
12319
confluent-platform = callPackage ../servers/confluent-platform {};