-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
50 lines (44 loc) · 1.26 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
lib ? pkgs.lib,
pkgs ? (import <nixpkgs> {
overlays = [
(import "${fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz"}/overlay.nix")
];
}),
toolchain ? pkgs.fenix.stable,
...
}: let
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain.cargo;
rustc = toolchain.rustc;
};
cargoToml = lib.importTOML ./Cargo.toml;
srcFileName = ''lib${builtins.replaceStrings ["-"] ["_"] cargoToml.package.name}.so'';
outFileName = "jetbrains.so";
in
rustPlatform.buildRustPackage rec {
inherit (cargoToml.package) name version;
pname = name;
RUSTFLAGS = "--cfg rofi_next";
nativeBuildInputs = with pkgs; [
pkg-config
];
buildInputs = with pkgs; [
glib.dev
gtk3.dev
];
postInstall = ''
mkdir -p $out/lib/rofi
mv $out/lib/${srcFileName} $out/lib/rofi/${outFileName}
'';
doCheck = false;
cargoLock.lockFile = ./Cargo.lock;
src = ./.;
meta = with lib; {
description = "A rofi plugin that adds the ability to launch recent projects in JetBrains IDEs";
homepage = "https://github.com/zakuciael/rofi-jetbrains";
license = licenses.mit;
maintainers = with maintainers; [zakuciael];
platforms = platforms.linux;
};
}