Skip to content

Commit

Permalink
Update flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
kings177 authored Mar 10, 2024
1 parent 46e7c59 commit 5b72291
Showing 1 changed file with 29 additions and 40 deletions.
69 changes: 29 additions & 40 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,56 +12,45 @@
nix-filter.url = "github:numtide/nix-filter";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs: let
nix-filter = import inputs.nix-filter;
pkgs = common: packages: builtins.map (element: common.pkgs.${element}) packages;
in
inputs.nci.lib.makeOutputs {
outputs = inputs:
let
name = "hvm";
nix-filter = import inputs.nix-filter;
pkgs = common: packages:
builtins.map (element: common.pkgs.${element}) packages;
in inputs.nci.lib.makeOutputs {
config = common: {
cCompiler = {
enable = true;
package = common.pkgs.clang;
};
cCompiler = { package = common.pkgs.clang; };
outputs = {
defaults = {
app = "hvm";
package = "hvm";
app = name;
package = name;
};
};
runtimeLibs = pkgs common ["openssl"];
shell = {commands = builtins.map (element: {package = common.pkgs.${element};}) ["ghc" "nodejs"];};
runtimeLibs = pkgs common [ "openssl" ];
shell = {
commands =
builtins.map (element: { package = common.pkgs.${element}; }) [
"ghc"
"nodejs"
];
};
};
pkgConfig = common: let
buildInputs = common.libs.getLibs ["openssl" "pkg-config"];
in {
hvm = {
app = true;
build = true;
overrides = {
inherit buildInputs;
meta = with common.pkgs.lib; {
description = "A massively parallel functional runtime.";
homepage = "https://github.com/HigherOrderCO/HVM";
license = licenses.mit;
};
};
depsOverrides = {inherit buildInputs;};
profiles = {
dev = false;
dev_fast = false;
release = false;
pkgConfig = common:
let
override = { buildInputs = pkgs common [ "openssl" "pkg-config" ]; };
in {
${name} = {
app = true;
build = true;
depsOverrides = { inherit override; };
overrides = { inherit override; };
profiles = { release = false; };
};
};
};
# Only include directories necessary for building the project, to make the derivation smaller.
root = nix-filter {
root = ./.;
include = [
./src
./Cargo.lock
./Cargo.toml
./rust-toolchain.toml
];
include = [ "src" "Cargo.lock" "Cargo.toml" "rust-toolchain.toml" ];
};
};
}

0 comments on commit 5b72291

Please sign in to comment.