nixpkgs/pkgs/tools/nix/nixci/default.nix
shivaraj-bh 5efa13b4a4 nixci: 0.2.0 -> 0.4.0; fix Darwin build
https://github.com/srid/nixci/releases/tag/0.4.0

Add SystemConfiguration and IOKit from apple_sdk to fix the darwin build failure
2024-04-20 17:59:37 +05:30

52 lines
1.1 KiB
Nix

{ lib, stdenv
, rustPlatform
, fetchCrate
, fetchFromGitHub
, libiconv
, openssl
, pkg-config
, Security
, SystemConfiguration
, IOKit
}:
rustPlatform.buildRustPackage rec {
pname = "nixci";
version = "0.4.0";
src = fetchCrate {
inherit version;
pname = "nixci";
hash = "sha256-JC1LUny8UKflANlcx6Hcgx39CRry+ossnp/RQK36oaI=";
};
cargoHash = "sha256-pYPzM7QlQ2EXwrvuXMa1qs0m7cmumh1iPesgJZ0H2kg=";
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.isLinux [
openssl
] ++ lib.optionals stdenv.isDarwin [
IOKit
Security
SystemConfiguration
];
# The rust program expects an environment (at build time) that points to the
# devour-flake flake.
env.DEVOUR_FLAKE = fetchFromGitHub {
owner = "srid";
repo = "devour-flake";
rev = "v3";
hash = "sha256-O51F4YFOzlaQAc9b6xjkAqpvrvCtw/Os2M7TU0y4SKQ=";
};
meta = with lib; {
description = "Define and build CI for Nix projects anywhere";
homepage = "https://github.com/srid/nixci";
license = licenses.agpl3Only;
maintainers = with maintainers; [ srid shivaraj-bh ];
mainProgram = "nixci";
};
}