nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildRubyGem
3, bundlerEnv
4, ruby
5, poppler_utils
6}:
7let
8 deps = bundlerEnv rec {
9 name = "anystyle-cli-${version}";
10 source.sha256 = lib.fakeSha256;
11 version = "1.3.1";
12 inherit ruby;
13 gemdir = ./.;
14 gemset = lib.recursiveUpdate (import ./gemset.nix) {
15 anystyle.source = {
16 remotes = ["https://rubygems.org"];
17 sha256 = "1w79zcia60nnnyrmyvpd10pmxrpk5c7lj9gmmblhwi8x5mfq9k0n";
18 type = "gem";
19 };
20 };
21 };
22in
23buildRubyGem rec {
24 inherit ruby;
25 gemName = "anystyle-cli";
26 pname = gemName;
27 version = "1.3.1";
28 source.sha256 = "1a3ifwxwqkp5dnfk9r8qq8kgfb8k1pl7jjdghbb8ixbxz9ac7awy";
29
30 propagatedBuildInputs = [ deps ];
31
32 preFixup = ''
33 wrapProgram $out/bin/anystyle --prefix PATH : ${poppler_utils}/bin
34 '';
35
36 meta = with lib; {
37 description = "Command line interface to the AnyStyle Parser and Finder";
38 homepage = "https://anystyle.io/";
39 license = licenses.bsd2;
40 maintainers = with maintainers; [ shamilton ];
41 mainProgram = "anystyle";
42 platforms = platforms.unix;
43 };
44}