mirror of
https://github.com/ellmau/adf-obdd.git
synced 2025-12-19 09:29:36 +01:00
Add flake app and packages for adf-bdd (#155)
* Add flake packages for adf-bdd
This commit is contained in:
parent
fc0042fcd1
commit
627a1a1810
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -303,7 +303,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "adf-bdd-bin"
|
||||
version = "0.3.0"
|
||||
version = "0.3.0-dev"
|
||||
dependencies = [
|
||||
"adf_bdd",
|
||||
"assert_cmd",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "adf-bdd-bin"
|
||||
version = "0.3.0"
|
||||
version = "0.3.0-dev"
|
||||
authors = ["Stefan Ellmauthaler <stefan.ellmauthaler@tu-dresden.de>"]
|
||||
edition = "2021"
|
||||
homepage = "https://ellmau.github.io/adf-obdd"
|
||||
|
||||
37
flake.lock
generated
37
flake.lock
generated
@ -1,6 +1,24 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1657226504,
|
||||
"narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
@ -18,22 +36,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignoresrc": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1660459072,
|
||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1690927903,
|
||||
@ -69,15 +71,14 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"gitignoresrc": "gitignoresrc",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
|
||||
98
flake.nix
98
flake.nix
@ -1,57 +1,89 @@
|
||||
{
|
||||
description = "basic rust flake";
|
||||
rec {
|
||||
description = "adf-bdd, Abstract Dialectical Frameworks solved by Binary Decision Diagrams; developed in Dresden";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
flake-utils.follows = "flake-utils/flake-utils";
|
||||
};
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
gitignoresrc = {
|
||||
url = "github:hercules-ci/gitignore.nix";
|
||||
flake = false;
|
||||
};
|
||||
flake-utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
flake-utils,
|
||||
gitignoresrc,
|
||||
rust-overlay,
|
||||
...
|
||||
} @ inputs:
|
||||
{
|
||||
#overlay = import ./nix { inherit gitignoresrc; };
|
||||
}
|
||||
// (flake-utils.lib.eachDefaultSystem (system: let
|
||||
unstable = import nixpkgs-unstable {inherit system;};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [(import rust-overlay)];
|
||||
}:
|
||||
flake-utils.lib.mkFlake {
|
||||
inherit self inputs;
|
||||
channels.nixpkgs.overlaysBuilder = channels: [rust-overlay.overlays.default];
|
||||
outputsBuilder = channels: let
|
||||
pkgs = channels.nixpkgs;
|
||||
toolchain = pkgs.rust-bin.stable.latest.default;
|
||||
platform = pkgs.makeRustPlatform {
|
||||
cargo = toolchain;
|
||||
rustc = toolchain;
|
||||
};
|
||||
in rec {
|
||||
devShell = pkgs.mkShell {
|
||||
packages = let
|
||||
cargoMetaBin = (builtins.fromTOML (builtins.readFile ./bin/Cargo.toml)).package;
|
||||
cargoMetaLib = (builtins.fromTOML (builtins.readFile ./lib/Cargo.toml)).package;
|
||||
meta = {
|
||||
inherit description;
|
||||
homepage = "https://github.com/ellmau/adf-obdd";
|
||||
license = [pkgs.lib.licenses.mit];
|
||||
|
||||
nativeBuildInputs = with platform; [
|
||||
cargoBuildHook
|
||||
cargoCheckHook
|
||||
];
|
||||
};
|
||||
in rec {
|
||||
adf-bdd = platform.buildRustPackage {
|
||||
pname = "adf-bdd";
|
||||
inherit (cargoMetaBin) version;
|
||||
inherit meta;
|
||||
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
buildAndTestSubdir = "bin";
|
||||
};
|
||||
adf_bdd = platform.buildRustPackage {
|
||||
pname = "adf_bdd";
|
||||
inherit (cargoMetaLib) version;
|
||||
inherit meta;
|
||||
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
buildAndTestSubdir = "lib";
|
||||
};
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
RUST_LOG = "debug";
|
||||
RUST_BACKTRACE = 1;
|
||||
buildInputs = [
|
||||
pkgs.rust-bin.stable.latest.rustfmt
|
||||
pkgs.rust-bin.stable.latest.default
|
||||
shellHook = ''
|
||||
export PATH=''${HOME}/.cargo/bin''${PATH+:''${PATH}}
|
||||
'';
|
||||
buildInputs = let
|
||||
notOn = systems:
|
||||
pkgs.lib.optionals (!builtins.elem pkgs.system systems);
|
||||
in
|
||||
[
|
||||
toolchain
|
||||
pkgs.rust-analyzer
|
||||
pkgs.cargo-audit
|
||||
pkgs.cargo-license
|
||||
pkgs.cargo-tarpaulin
|
||||
pkgs.cargo-kcov
|
||||
pkgs.valgrind
|
||||
pkgs.gnuplot
|
||||
pkgs.kcov
|
||||
];
|
||||
]
|
||||
++ (notOn ["aarch64-darwin" "x86_64-darwin"] [pkgs.kcov pkgs.cargo-kcov pkgs.gnuplot pkgs.valgrind])
|
||||
++ (notOn ["aarch64-linux" "aarch64-darwin" "i686-linux"] [pkgs.cargo-tarpaulin]);
|
||||
};
|
||||
};
|
||||
};
|
||||
}));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user