feat: add an overlay output

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
raito 2024-11-14 19:04:07 +01:00
parent 2db0eff088
commit 705adbb8e4

View file

@ -1,5 +1,41 @@
{ sources ? import ./npins, pkgs ? import sources.nixpkgs {} }:
{
overlay = self: super:
let
inherit (super) lib;
in
{
ofborg = super.rustPlatform.buildRustPackage {
name = "ofborg";
src = super.nix-gitignore.gitignoreSource [ ] ./.;
nativeBuildInputs = with pkgs; [
pkg-config
rustPackages.clippy
];
buildInputs = lib.optionals super.stdenv.isDarwin (with pkgs; [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.CoreFoundation
]);
preBuild = ''
cargo clippy
'';
doCheck = false; # Tests require access to a /nix/ and a nix daemon
checkInputs = with super; [
lix
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"hubcaps-0.6.2" = "sha256-yyHOCxUsehvtYfttRY4T9TDrJhSKGpJRa/SX3Sd1TNc=";
};
};
};
};
packages = {
ofborg = pkgs.rustPlatform.buildRustPackage {
name = "ofborg";