Compiling and linking with sword
This commit is contained in:
@@ -5,8 +5,14 @@
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-root.url = "github:srid/flake-root";
|
||||
hooks.url = "github:cachix/git-hooks.nix";
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
naersk = {
|
||||
url = "github:nix-community/naersk";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -49,6 +55,10 @@
|
||||
|
||||
buildInputs = self'.checks.pre-commit.enabledPackages;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
|
||||
|
||||
inherit (self'.checks.pre-commit) shellHook;
|
||||
@@ -87,7 +97,16 @@
|
||||
# This is not special, this is just flakes
|
||||
packages = rec {
|
||||
default = rustpkg;
|
||||
rustpkg = naersk-lib.buildPackage ./.;
|
||||
rustpkg = naersk-lib.buildPackage {
|
||||
src = ./.;
|
||||
buildInputs = with pkgs; [
|
||||
sword
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
];
|
||||
doCheck = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user