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]]
|
[[package]]
|
||||||
name = "adf-bdd-bin"
|
name = "adf-bdd-bin"
|
||||||
version = "0.3.0"
|
version = "0.3.0-dev"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"adf_bdd",
|
"adf_bdd",
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "adf-bdd-bin"
|
name = "adf-bdd-bin"
|
||||||
version = "0.3.0"
|
version = "0.3.0-dev"
|
||||||
authors = ["Stefan Ellmauthaler <stefan.ellmauthaler@tu-dresden.de>"]
|
authors = ["Stefan Ellmauthaler <stefan.ellmauthaler@tu-dresden.de>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
homepage = "https://ellmau.github.io/adf-obdd"
|
homepage = "https://ellmau.github.io/adf-obdd"
|
||||||
|
|||||||
37
flake.lock
generated
37
flake.lock
generated
@ -1,6 +1,24 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"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": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
@ -18,22 +36,6 @@
|
|||||||
"type": "github"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690927903,
|
"lastModified": 1690927903,
|
||||||
@ -69,15 +71,14 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"gitignoresrc": "gitignoresrc",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
|
"flake-utils",
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|||||||
112
flake.nix
112
flake.nix
@ -1,57 +1,89 @@
|
|||||||
{
|
rec {
|
||||||
description = "basic rust flake";
|
description = "adf-bdd, Abstract Dialectical Frameworks solved by Binary Decision Diagrams; developed in Dresden";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
rust-overlay = {
|
rust-overlay = {
|
||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
flake-utils.follows = "flake-utils";
|
flake-utils.follows = "flake-utils/flake-utils";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
||||||
gitignoresrc = {
|
|
||||||
url = "github:hercules-ci/gitignore.nix";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = inputs @ {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
|
||||||
nixpkgs-unstable,
|
|
||||||
flake-utils,
|
flake-utils,
|
||||||
gitignoresrc,
|
|
||||||
rust-overlay,
|
rust-overlay,
|
||||||
...
|
...
|
||||||
} @ inputs:
|
}:
|
||||||
{
|
flake-utils.lib.mkFlake {
|
||||||
#overlay = import ./nix { inherit gitignoresrc; };
|
inherit self inputs;
|
||||||
}
|
channels.nixpkgs.overlaysBuilder = channels: [rust-overlay.overlays.default];
|
||||||
// (flake-utils.lib.eachDefaultSystem (system: let
|
outputsBuilder = channels: let
|
||||||
unstable = import nixpkgs-unstable {inherit system;};
|
pkgs = channels.nixpkgs;
|
||||||
pkgs = import nixpkgs {
|
toolchain = pkgs.rust-bin.stable.latest.default;
|
||||||
inherit system;
|
platform = pkgs.makeRustPlatform {
|
||||||
overlays = [(import rust-overlay)];
|
cargo = toolchain;
|
||||||
|
rustc = toolchain;
|
||||||
|
};
|
||||||
|
in rec {
|
||||||
|
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;
|
||||||
|
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
|
||||||
|
]
|
||||||
|
++ (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]);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in rec {
|
};
|
||||||
devShell = pkgs.mkShell {
|
|
||||||
RUST_LOG = "debug";
|
|
||||||
RUST_BACKTRACE = 1;
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.rust-bin.stable.latest.rustfmt
|
|
||||||
pkgs.rust-bin.stable.latest.default
|
|
||||||
pkgs.rust-analyzer
|
|
||||||
pkgs.cargo-audit
|
|
||||||
pkgs.cargo-license
|
|
||||||
pkgs.cargo-tarpaulin
|
|
||||||
pkgs.cargo-kcov
|
|
||||||
pkgs.valgrind
|
|
||||||
pkgs.gnuplot
|
|
||||||
pkgs.kcov
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user