2023-08-09 00:48:34 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, zig_0_11
|
|
|
|
, nix
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zon2nix";
|
2023-09-04 01:32:34 +02:00
|
|
|
version = "0.1.2";
|
2023-08-09 00:48:34 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-09-04 01:32:34 +02:00
|
|
|
owner = "nix-community";
|
2023-08-09 00:48:34 +02:00
|
|
|
repo = "zon2nix";
|
|
|
|
rev = "v${version}";
|
2023-09-04 01:32:34 +02:00
|
|
|
hash = "sha256-pS0D+wdebtpNaGpDee9aBwEKTDvNU56VXer9uzULXcM=";
|
2023-08-09 00:48:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
zig_0_11.hook
|
|
|
|
];
|
|
|
|
|
2023-09-04 01:32:34 +02:00
|
|
|
zigBuildFlags = [
|
|
|
|
"-Dnix=${lib.getExe nix}"
|
|
|
|
];
|
|
|
|
|
|
|
|
zigCheckFlags = [
|
|
|
|
"-Dnix=${lib.getExe nix}"
|
|
|
|
];
|
2023-08-09 00:48:34 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Convert the dependencies in `build.zig.zon` to a Nix expression";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "zon2nix";
|
2023-09-04 01:32:34 +02:00
|
|
|
homepage = "https://github.com/nix-community/zon2nix";
|
|
|
|
changelog = "https://github.com/nix-community/zon2nix/blob/${src.rev}/CHANGELOG.md";
|
2023-08-09 00:48:34 +02:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
inherit (zig_0_11.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|