nixpkgs/pkgs/by-name/ni/nixel/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
965 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, testers
, nixel
}:
rustPlatform.buildRustPackage rec {
pname = "nixel";
version = "4.1.0";
src = fetchFromGitHub {
owner = "kamadorueda";
repo = pname;
rev = version;
sha256 = "sha256-dQ3wzBTjteqk9rju+FMAO+ydimnGu24Y2DEDLX/P+1A=";
};
cargoHash = "sha256-1OsHs0W3ji9Kgpv7nGY9XyGxJ4c0faN2VuFLsdwkgKY=";
# Package requires a non reproducible submodule
# https://github.com/kamadorueda/nixel/blob/2873bd84bf4fc540d0ae8af062e109cc9ad40454/.gitmodules#L7
doCheck = false;
#
# Let's test it runs
passthru.tests = {
version = testers.testVersion { package = nixel; };
};
meta = with lib; {
description = "Lexer, Parser, Abstract Syntax Tree and Concrete Syntax Tree for the Nix Expressions Language";
mainProgram = "nixel";
homepage = "https://github.com/kamadorueda/nixel";
license = licenses.agpl3Only;
maintainers = with maintainers; [ kamadorueda ];
};
}