move c# bindings into separate repository
This commit is contained in:
parent
2f7a2dfd62
commit
cbd0186fdc
100 changed files with 159 additions and 12738 deletions
99
flake.nix
99
flake.nix
|
@ -3,17 +3,12 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
naersk = {
|
||||
url = "github:nix-community/naersk";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
naersk,
|
||||
}:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
|
@ -33,98 +28,11 @@
|
|||
}
|
||||
);
|
||||
in
|
||||
rec {
|
||||
packages = forAllSystems (
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
naersk' = pkgs.callPackage naersk { };
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
xe
|
||||
xz
|
||||
];
|
||||
makeExample =
|
||||
{
|
||||
package,
|
||||
example,
|
||||
features ? "",
|
||||
}:
|
||||
naersk'.buildPackage {
|
||||
pname = example;
|
||||
cargoBuildOptions =
|
||||
x:
|
||||
x
|
||||
++ [
|
||||
"--package"
|
||||
package
|
||||
];
|
||||
src = ./.;
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
strictDeps = true;
|
||||
gitSubmodules = true;
|
||||
overrideMain = old: {
|
||||
preConfigure = ''
|
||||
cargo_build_options="$cargo_build_options --example ${example} ${
|
||||
if features == "" then "" else "--features " + features
|
||||
}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
makePackage =
|
||||
package:
|
||||
let
|
||||
package-param = [
|
||||
"--package"
|
||||
package
|
||||
];
|
||||
in
|
||||
naersk'.buildPackage {
|
||||
pname = package;
|
||||
cargoBuildOptions = x: x ++ package-param;
|
||||
cargoTestOptions = x: x ++ package-param;
|
||||
src = ./.;
|
||||
doCheck = true;
|
||||
strictDeps = true;
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
servicepoint = makePackage "servicepoint";
|
||||
announce = makeExample {
|
||||
package = "servicepoint";
|
||||
example = "announce";
|
||||
};
|
||||
game-of-life = makeExample {
|
||||
package = "servicepoint";
|
||||
example = "game_of_life";
|
||||
features = "rand";
|
||||
};
|
||||
moving-line = makeExample {
|
||||
package = "servicepoint";
|
||||
example = "moving_line";
|
||||
};
|
||||
random-brightness = makeExample {
|
||||
package = "servicepoint";
|
||||
example = "random_brightness";
|
||||
features = "rand";
|
||||
};
|
||||
wiping-clear = makeExample {
|
||||
package = "servicepoint";
|
||||
example = "wiping_clear";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
legacyPackages = packages;
|
||||
|
||||
{
|
||||
devShells = forAllSystems (
|
||||
{ pkgs, system }:
|
||||
{
|
||||
default = pkgs.mkShell rec {
|
||||
inputsFrom = [ self.packages.${system}.servicepoint ];
|
||||
packages = with pkgs; [
|
||||
(pkgs.symlinkJoin
|
||||
{
|
||||
|
@ -139,12 +47,13 @@
|
|||
cargo-tarpaulin
|
||||
];
|
||||
})
|
||||
ruby
|
||||
dotnet-sdk_8
|
||||
gcc
|
||||
gnumake
|
||||
xe
|
||||
xz
|
||||
pkg-config
|
||||
];
|
||||
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (builtins.concatMap (d: d.buildInputs) inputsFrom)}";
|
||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue