init: connection made
This commit is contained in:
commit
c0d58cd349
6 changed files with 415 additions and 0 deletions
62
flake.nix
Normal file
62
flake.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
description = "Flake to build and develop honeyfetch";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, flake-utils, naersk, nixpkgs }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
naersk' = pkgs.callPackage naersk {};
|
||||
|
||||
# Common variables
|
||||
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
|
||||
CLANG_PATH = "${pkgs.llvmPackages.clang}/bin/clang";
|
||||
|
||||
commonBuildInputs = with pkgs; [ libdrm openssl ];
|
||||
commonNativeInputs = with pkgs; [ rustc cargo clippy ];
|
||||
|
||||
srcPath = builtins.path { path = ./.; name = "source"; };
|
||||
in rec {
|
||||
packages = {
|
||||
default = naersk'.buildPackage {
|
||||
inherit LIBCLANG_PATH CLANG_PATH;
|
||||
src = srcPath;
|
||||
nativeBuildInputs = commonNativeInputs ++ commonBuildInputs;
|
||||
};
|
||||
|
||||
check = naersk'.buildPackage {
|
||||
inherit LIBCLANG_PATH CLANG_PATH;
|
||||
src = srcPath;
|
||||
nativeBuildInputs = commonNativeInputs ++ commonBuildInputs;
|
||||
};
|
||||
|
||||
test = naersk'.buildPackage {
|
||||
inherit LIBCLANG_PATH CLANG_PATH;
|
||||
src = srcPath;
|
||||
nativeBuildInputs = commonNativeInputs ++ commonBuildInputs;
|
||||
mode = "test";
|
||||
};
|
||||
|
||||
clippy = naersk'.buildPackage {
|
||||
inherit LIBCLANG_PATH CLANG_PATH;
|
||||
src = srcPath;
|
||||
nativeBuildInputs = commonNativeInputs ++ commonBuildInputs;
|
||||
mode = "clippy";
|
||||
};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
inherit LIBCLANG_PATH CLANG_PATH;
|
||||
nativeBuildInputs = commonNativeInputs ++ commonBuildInputs;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue