Skip to content

Commit 747f842

Browse files
authored
mdevctl: fix script dir location (#383111)
2 parents 92d410c + a3fff10 commit 747f842

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

nixos/modules/programs/mdevctl.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ in
1616
config = lib.mkIf cfg.enable {
1717
environment.systemPackages = with pkgs; [ mdevctl ];
1818

19-
environment.etc."mdevctl.d/scripts.d/notifiers/.keep".text = "";
20-
environment.etc."mdevctl.d/scripts.d/callouts/.keep".text = "";
19+
environment.etc."mdevctl.d/.keep".text = "";
20+
environment.etc."mdevctl/scripts.d/notifiers/.keep".text = "";
21+
environment.etc."mdevctl/scripts.d/callouts/.keep".text = "";
2122

2223
};
2324
}

pkgs/by-name/md/mdevctl/package.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ rustPlatform.buildRustPackage rec {
1515
hash = "sha256-4K4NW3DOTtzZJ7Gg0mnRPr88YeqEjTtKX+C4P8i923E=";
1616
};
1717

18+
# https://github.com/mdevctl/mdevctl/issues/111
19+
patches = [
20+
./script-dir.patch
21+
];
22+
1823
useFetchCargoVendor = true;
1924
cargoHash = "sha256-xfrW7WiKBM9Hz49he/42z9gBrwZ3sKGH/u105hcyln0=";
2025

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/environment.rs b/src/environment.rs
2+
index 3db5933..f6da56c 100644
3+
--- a/src/environment.rs
4+
+++ b/src/environment.rs
5+
@@ -35,7 +35,7 @@ pub trait Environment {
6+
}
7+
8+
fn scripts_base(&self) -> PathBuf {
9+
- self.root().join("usr/lib/mdevctl/scripts.d")
10+
+ self.root().join("etc/mdevctl/scripts.d")
11+
}
12+
13+
fn callout_dir(&self) -> PathBuf {

0 commit comments

Comments
 (0)