tetrd: 1.0.4 -> 1.3.1-1, modify module (#478196)
This commit is contained in:
@@ -5,13 +5,19 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.tetrd;
|
||||
in
|
||||
{
|
||||
options.services.tetrd.enable = lib.mkEnableOption "tetrd";
|
||||
options.services.tetrd = {
|
||||
enable = lib.mkEnableOption "tetrd";
|
||||
package = lib.mkPackageOption pkgs "tetrd" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.tetrd.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [ pkgs.tetrd ];
|
||||
etc."resolv.conf".source = "/etc/tetrd/resolv.conf";
|
||||
systemPackages = [ cfg.package ];
|
||||
# etc."resolv.conf".source = "/etc/tetrd/resolv.conf"; # Disabled overwriting of resolve.conf since otherwise tetrd disables your dns when its not connected to a device.
|
||||
};
|
||||
|
||||
# Our resolv.conf will override resolvconf's version.
|
||||
@@ -21,11 +27,11 @@
|
||||
tmpfiles.rules = [ "f /etc/tetrd/resolv.conf - - -" ];
|
||||
|
||||
services.tetrd = {
|
||||
description = pkgs.tetrd.meta.description;
|
||||
description = cfg.package.meta.description;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.tetrd}/opt/Tetrd/bin/tetrd";
|
||||
ExecStart = "${cfg.package}/opt/Tetrd/bin/tetrd";
|
||||
Restart = "always";
|
||||
RuntimeDirectory = "tetrd";
|
||||
RootDirectory = "/run/tetrd";
|
||||
|
||||
@@ -21,15 +21,16 @@
|
||||
libappindicator,
|
||||
udev,
|
||||
libgbm,
|
||||
libGL,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tetrd";
|
||||
version = "1.0.4";
|
||||
version = "1.3.1-1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://web.archive.org/web/20211130190525/https://download.tetrd.app/files/tetrd.linux_amd64.pkg.tar.xz";
|
||||
sha256 = "1bxp7rg2dm9nnvkgg48xd156d0jgdf35flaw0bwzkkh3zz9ysry2";
|
||||
url = "https://web.archive.org/web/20260108185127/https://download.tetrd.app/files/tetrd.linux_amd64.pkg.tar.xz";
|
||||
sha256 = "0mpixs20jrxkbxvd7nl0p664jgqfp3m6qf7kmsj7frkhky697fbm";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
@@ -42,6 +43,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libGL
|
||||
c-ares
|
||||
ffmpeg
|
||||
libevent
|
||||
@@ -71,6 +73,9 @@ stdenv.mkDerivation rec {
|
||||
wrapProgram $out/opt/Tetrd/tetrd \
|
||||
--prefix LD_LIBRARY_PATH ":" ${lib.makeLibraryPath buildInputs}
|
||||
|
||||
mkdir $out/bin
|
||||
ln -s $out/opt/Tetrd/tetrd $out/bin/tetrd
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -84,5 +89,6 @@ stdenv.mkDerivation rec {
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
license = lib.licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "tetrd";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user