2023-07-20 12:44:38 +00:00
|
|
|
{ lib, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
2023-09-13 17:35:50 +00:00
|
|
|
, fetchFromGitHub
|
2023-07-20 12:44:38 +00:00
|
|
|
, libiconv
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
2023-07-23 14:23:46 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-07-20 12:44:38 +00:00
|
|
|
pname = "nixci";
|
2023-09-13 17:35:50 +00:00
|
|
|
version = "0.2.0";
|
2023-07-20 12:44:38 +00:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit version;
|
|
|
|
pname = "nixci";
|
2023-09-13 17:35:50 +00:00
|
|
|
hash = "sha256-Q3V/JL64xkIj0X0NSMRTjRAP3PJC9ouj3CmEscVWdns=";
|
2023-07-20 12:44:38 +00:00
|
|
|
};
|
|
|
|
|
2023-09-13 17:35:50 +00:00
|
|
|
cargoHash = "sha256-tjk91AaPsMLfXYB2o1HTTxb6Qr3l8BABPStrKEGvbtM=";
|
2023-07-20 12:44:38 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ libiconv openssl ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
|
|
|
# The rust program expects an environment (at build time) that points to the
|
2023-09-13 17:35:50 +00:00
|
|
|
# devour-flake flake.
|
|
|
|
env.DEVOUR_FLAKE = fetchFromGitHub {
|
|
|
|
owner = "srid";
|
|
|
|
repo = "devour-flake";
|
|
|
|
rev = "v3";
|
|
|
|
hash = "sha256-O51F4YFOzlaQAc9b6xjkAqpvrvCtw/Os2M7TU0y4SKQ=";
|
|
|
|
};
|
2023-07-20 12:44:38 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
mainProgram = "nixci";
|
|
|
|
};
|
|
|
|
}
|