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 1d83c3c commit fe4da40
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
description = "A massively parallel functional runtime.";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
nix-cargo-integration.url = "github:yusdacra/nix-cargo-integration";
nix-filter.url = "github:numtide/nix-filter";
};

outputs = { self, nixpkgs, flake-utils, rust-overlay }:
outputs = { self, nixpkgs, flake-utils, nix-cargo-integration, nix-filter }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlay ];
overlays = [ nix-cargo-integration.overlay ];
};

src = builtins.filterSource
(name: type: builtins.elem (baseNameOf name) [
filteredSrc = nix-filter.lib.filterSource {
src = ./.;
filter = name: type: builtins.elem (baseNameOf name) [
"src" "Cargo.lock" "Cargo.toml" "rust-toolchain.toml"
])
./.;

] || (type == "directory" && builtins.elem (baseNameOf name) [
"src"
]);
};

in {
packages = {
hvm = pkgs.stdenv.mkDerivation {
pname = "hvm";
version = "0.1.0";
src = pkgs.lib.cleanSource src;
buildInputs = [ pkgs.openssl pkgs.pkg-config ];
};
defaultPackage = pkgs.nci.buildPackage {
name = "hvm";
src = filteredSrc;
cargoToml = "Cargo.toml";
buildInputs = with pkgs; [ openssl pkg-config ];
};

defaultPackage = self.packages.${system}.hvm;
}
);
}

0 comments on commit fe4da40

Please sign in to comment.