File tree Expand file tree Collapse file tree 5 files changed +29
-23
lines changed Expand file tree Collapse file tree 5 files changed +29
-23
lines changed Original file line number Diff line number Diff line change 1
1
[workspace ]
2
+ resolver = " 2"
2
3
members = [
3
4
" anyrun" ,
4
5
" anyrun-plugin" ,
Original file line number Diff line number Diff line change 35
35
# it is possible to streamline calling packages with a single function
36
36
# that takes name as an argument, and handles default inherits.
37
37
mkPlugin = name :
38
- callPackage ./nix/plugins/default .nix {
38
+ callPackage ./nix/packages/plugin .nix {
39
39
inherit inputs lockFile ;
40
40
inherit name ;
41
41
} ;
44
44
45
45
# By default the anyrun package is built without any plugins
46
46
# as per the `dontBuildPlugins` arg.
47
- anyrun = callPackage ./nix/default .nix { inherit inputs lockFile ; } ;
48
- anyrun-with-all-plugins = callPackage ./nix/default .nix {
47
+ anyrun = callPackage ./nix/packages/anyrun .nix { inherit inputs lockFile ; } ;
48
+ anyrun-with-all-plugins = callPackage ./nix/packages/anyrun .nix {
49
49
inherit inputs lockFile ;
50
50
dontBuildPlugins = false ;
51
51
} ;
72
72
default = pkgs . mkShell {
73
73
inputsFrom = builtins . attrValues self' . packages ;
74
74
packages = with pkgs ; [
75
- rustc # rust compiler
75
+ rustc
76
76
gcc
77
- cargo # rust package manager
78
- clippy # opinionated rust formatter
77
+ cargo
78
+ clippy
79
+ rustfmt
79
80
] ;
80
81
} ;
81
82
82
83
nix = pkgs . mkShellNoCC {
83
84
packages = with pkgs ; [
84
- alejandra # nix formatter
85
- rustfmt # rust formatter
86
- statix # lints and suggestions
87
- deadnix # clean up unused nix code
85
+ alejandra # formatter
86
+ statix # linter
87
+ deadnix # dead-code finder
88
88
] ;
89
89
} ;
90
90
} ;
95
95
96
96
flake = {
97
97
homeManagerModules = {
98
- anyrun = import ./nix/hm-module .nix self ;
98
+ anyrun = import ./nix/modules/home-manager .nix self ;
99
99
default = self . homeManagerModules . anyrun ;
100
100
} ;
101
101
} ;
Original file line number Diff line number Diff line change 2
2
config ,
3
3
pkgs ,
4
4
lib ,
5
- hm ,
6
5
...
7
6
} : let
8
- cfg = config . programs . anyrun ;
9
-
10
- defaultPackage = self . packages . ${ pkgs . stdenv . hostPlatform . system } . default ;
11
-
12
7
inherit ( builtins ) map toJSON toString substring stringLength ;
13
8
inherit ( lib . modules ) mkIf mkMerge ;
14
9
inherit ( lib . options ) mkOption mkEnableOption literalExpression ;
@@ -17,6 +12,9 @@ self: {
17
12
inherit ( lib . strings ) toLower toUpper replaceStrings ;
18
13
inherit ( lib . trivial ) boolToString ;
19
14
inherit ( lib . types ) nullOr package submodule int float listOf either str enum lines bool attrs ;
15
+
16
+ defaultPackage = self . packages . ${ pkgs . stdenv . hostPlatform . system } . default ;
17
+ cfg = config . programs . anyrun ;
20
18
in {
21
19
meta . maintainers = with lib . maintainers ; [ n3oney NotAShelf ] ;
22
20
Original file line number Diff line number Diff line change 22
22
} : let
23
23
inherit ( builtins ) fromTOML readFile ;
24
24
25
- cargoToml = fromTOML ( readFile ../anyrun/Cargo.toml ) ;
25
+ cargoToml = fromTOML ( readFile ../../ anyrun/Cargo.toml ) ;
26
26
pname = cargoToml . package . name ;
27
27
version = cargoToml . package . version ;
28
28
in
39
39
inherit lockFile ;
40
40
} ;
41
41
42
- checkInputs = [ cargo rustc ] ;
43
-
44
42
nativeBuildInputs = [
45
43
pkg-config
46
44
makeWrapper
63
61
else [ ] ;
64
62
65
63
doCheck = true ;
64
+ checkInputs = [ cargo rustc ] ;
65
+
66
66
copyLibs = true ;
67
67
68
68
buildAndTestSubdir =
69
69
if dontBuildPlugins
70
70
then pname
71
71
else null ;
72
72
73
- CARGO_BUILD_INCREMENTAL = "false" ;
73
+ CARGO_BUILD_INCREMENTAL = 0 ;
74
74
RUST_BACKTRACE = "full" ;
75
75
76
76
postInstall = ''
82
82
meta = {
83
83
description = "A wayland native, highly customizable runner." ;
84
84
homepage = "https://github.com/Kirottu/anyrun" ;
85
- license = with lib . licenses ; [ gpl3 ] ;
85
+ license = [ lib . licenses . gpl3 ] ;
86
86
mainProgram = "anyrun" ;
87
87
maintainers = with lib . maintainers ; [ NotAShelf n3oney ] ;
88
88
} ;
Original file line number Diff line number Diff line change 10
10
gtk-layer-shell ,
11
11
pkg-config ,
12
12
librsvg ,
13
+ cargo ,
14
+ rustc ,
13
15
# Generic args
14
16
name ,
15
17
lockFile ,
49
51
++ extraInputs ;
50
52
51
53
doCheck = true ;
54
+ checkInputs = [
55
+ cargo
56
+ rustc
57
+ ] ;
58
+
52
59
copyLibs = true ;
53
60
cargoBuildFlags = [ "-p ${ name } " ] ;
54
61
buildAndTestSubdir = "plugins/${ name } " ;
55
62
56
- CARGO_BUILD_INCREMENTAL = "false" ;
63
+ CARGO_BUILD_INCREMENTAL = 0 ;
57
64
RUST_BACKTRACE = "full" ;
58
65
59
66
meta = {
60
67
description = "The ${ name } plugin for Anyrun" ;
61
68
homepage = "https://github.com/Kirottu/anyrun" ;
62
- license = with lib . licenses ; [ gpl3 ] ;
69
+ license = [ lib . licenses . gpl3 ] ;
63
70
maintainers = with lib . maintainers ; [ NotAShelf n3oney ] ;
64
71
} ;
65
72
}
You can’t perform that action at this time.
0 commit comments