nixpkgs/pkgs/by-name/ni/nickel/package.nix
Aleksana d582f13e5e
treewide: switch to cargoHash (#327127)
* nickel: switch to cargoHash

* gnvim-unwrapped: switch to cargoHash

* surrealdb-migrations: switch to cargoHash

* wluma: switch to cargoHash

* httm: switch to cargoHash

No need (observed) for these packages to have a vendor Cargo.lock. If they for some reason have to use a different Cargo.lock than upstream, they should copy that to the build directory as well, otherwise the build will fail. They don't, so I infer there's no reason to use Cargo.lock.
2024-07-15 22:55:51 +03:00

53 lines
1.4 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, 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=";
};
cargoHash = "sha256-JwuBjCWETIlBX5xswdznOAmzkL0Rn6cv7pxM6DwAkOs=";
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";
};
}