This option provides a more convenient way to overlay dummy packages. It also adds a function `config.lib.test.mkStubPackage` that can, e.g., be used for `package` options.main
parent
b0651cc217
commit
cb09a968e9
@ -1,15 +1,14 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
{ |
||||
config = { |
||||
nixpkgs.overlays = [ (import ./fcitx5-overlay.nix) ]; |
||||
i18n.inputMethod = { |
||||
enabled = "fcitx5"; |
||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ]; |
||||
}; |
||||
imports = [ ./fcitx5-stubs.nix ]; |
||||
|
||||
nmt.script = '' |
||||
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service |
||||
''; |
||||
i18n.inputMethod = { |
||||
enabled = "fcitx5"; |
||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ]; |
||||
}; |
||||
|
||||
nmt.script = '' |
||||
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service |
||||
''; |
||||
} |
||||
|
@ -1,22 +0,0 @@ |
||||
final: prev: |
||||
|
||||
let |
||||
|
||||
dummy = prev.runCommandLocal "dummy-package" { } "mkdir $out"; |
||||
|
||||
in { |
||||
fcitx5 = prev.runCommandLocal "fcitx5" { version = "0"; } '' |
||||
mkdir -p $out/bin $out/share/applications $out/etc/xdg/autostart |
||||
touch $out/bin/fcitx5 \ |
||||
$out/share/applications/org.fcitx.Fcitx5.desktop \ |
||||
$out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop |
||||
chmod +x $out/bin/fcitx5 |
||||
''; |
||||
fcitx5-configtool = dummy; |
||||
fcitx5-lua = dummy; |
||||
fcitx5-qt = dummy; |
||||
fcitx5-gtk = dummy; |
||||
fcitx5-with-addons = |
||||
prev.fcitx5-with-addons.override { inherit (final) fcitx5-qt; }; |
||||
fcitx5-chinese-addons = dummy; |
||||
} |
@ -0,0 +1,27 @@ |
||||
{ |
||||
test.stubs = { |
||||
fcitx5 = { |
||||
version = "0"; |
||||
outPath = null; |
||||
buildScript = '' |
||||
mkdir -p $out/bin $out/share/applications $out/etc/xdg/autostart |
||||
touch $out/bin/fcitx5 \ |
||||
$out/share/applications/org.fcitx.Fcitx5.desktop \ |
||||
$out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop |
||||
chmod +x $out/bin/fcitx5 |
||||
''; |
||||
}; |
||||
fcitx5-configtool = { outPath = null; }; |
||||
fcitx5-lua = { outPath = null; }; |
||||
fcitx5-qt = { outPath = null; }; |
||||
fcitx5-gtk = { outPath = null; }; |
||||
fcitx5-chinese-addons = { outPath = null; }; |
||||
}; |
||||
|
||||
nixpkgs.overlays = [ |
||||
(self: super: { |
||||
fcitx5-with-addons = |
||||
super.fcitx5-with-addons.override { inherit (self) fcitx5-qt; }; |
||||
}) |
||||
]; |
||||
} |
@ -1,12 +0,0 @@ |
||||
self: super: { |
||||
rbw = self.writeScriptBin "dummy-rbw" ""; |
||||
pinentry = { |
||||
gnome3 = self.writeScriptBin "pinentry-gnome3" "" // { |
||||
outPath = "@pinentry-gnome3@"; |
||||
}; |
||||
gtk2 = self.writeScriptBin "pinentry-gtk2" "" // { |
||||
outPath = "@pinentry-gtk2@"; |
||||
}; |
||||
flavors = [ "gnome3" "gtk2" ]; |
||||
}; |
||||
} |
@ -0,0 +1,16 @@ |
||||
{ config, ... }: |
||||
|
||||
{ |
||||
test.stubs.rbw = { }; |
||||
|
||||
nixpkgs.overlays = [ |
||||
(self: super: { |
||||
pinentry = { |
||||
gnome3 = |
||||
config.lib.test.mkStubPackage { outPath = "@pinentry-gnome3@"; }; |
||||
gtk2 = config.lib.test.mkStubPackage { outPath = "@pinentry-gtk2@"; }; |
||||
flavors = [ "gnome3" "gtk2" ]; |
||||
}; |
||||
}) |
||||
]; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue