depot/third_party/nixpkgs/pkgs/by-name/ni/nickel/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

55 lines
1.3 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, python3
, nix-update-script
}:
rustPlatform.buildRustPackage rec {
pname = "nickel";
version = "1.7.0";
src = fetchFromGitHub {
owner = "tweag";
repo = "nickel";
rev = "refs/tags/${version}";
hash = "sha256-EwiZg0iyF9EQ0Z65Re5WgeV7xgs/wPtTQ9XA0iEMEIQ=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
cargoBuildFlags = [ "-p nickel-lang-cli" "-p nickel-lang-lsp" ];
nativeBuildInputs = [
python3
];
outputs = [ "out" "nls" ];
postInstall = ''
mkdir -p $nls/bin
mv $out/bin/nls $nls/bin/nls
'';
passthru.updateScript = nix-update-script { };
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.
'';
changelog = "https://github.com/tweag/nickel/blob/${version}/RELEASES.md";
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres felschr matthiasbeyer ];
mainProgram = "nickel";
};
}