2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2024-01-02 11:29:13 +00:00
|
|
|
, stdenv
|
2023-07-15 17:15:38 +00:00
|
|
|
, python3
|
2023-05-24 13:37:59 +00:00
|
|
|
, nix-update-script
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "nickel";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "1.7.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
src = fetchFromGitHub {
|
2022-04-27 09:35:20 +00:00
|
|
|
owner = "tweag";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = "nickel";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-EwiZg0iyF9EQ0Z65Re5WgeV7xgs/wPtTQ9XA0iEMEIQ=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
cargoBuildFlags = [ "-p nickel-lang-cli" "-p nickel-lang-lsp" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
outputs = [ "out" "nls" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $nls/bin
|
|
|
|
mv $out/bin/nls $nls/bin/nls
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://nickel-lang.org/";
|
|
|
|
description = "Better configuration for less";
|
|
|
|
longDescription = ''
|
|
|
|
Nickel is the cheap configuration language.
|
|
|
|
|
|
|
|
Its purpose is to automate the generation of static configuration files -
|
|
|
|
think JSON, YAML, XML, or your favorite data representation language -
|
|
|
|
that are then fed to another system. It is designed to have a simple,
|
|
|
|
well-understood core: it is in essence JSON with functions.
|
|
|
|
'';
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/tweag/nickel/blob/${version}/RELEASES.md";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.mit;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres felschr matthiasbeyer ];
|
2024-01-13 08:15:51 +00:00
|
|
|
mainProgram = "nickel";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|