mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport release-26.05] various: migrate to by-name (#526371)
This commit is contained in:
commit
1366b0adcc
17 changed files with 225 additions and 234 deletions
|
|
@ -1,151 +0,0 @@
|
|||
{
|
||||
pkgsBuildBuild,
|
||||
go,
|
||||
buildGoModule,
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
nixosTests,
|
||||
autoSignDarwinBinariesHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
let
|
||||
common =
|
||||
{
|
||||
stname,
|
||||
target,
|
||||
postInstall ? "",
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = stname;
|
||||
version = "2.0.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "syncthing";
|
||||
repo = "syncthing";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-v77ovjV+UoCRA1GteP+HDqC8dsRvtOhFX/IkSgSIf8Y=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-boYTLgvH+iWlh3y3Z0LPvSVGEget3X94AthtJKphhCw=";
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Recent versions of macOS seem to require binaries to be signed when
|
||||
# run from Launch Agents/Daemons, even on x86 devices where it has a
|
||||
# more lax code signing policy compared to Apple Silicon. So just sign
|
||||
# the binaries on both architectures to make it possible for launchd to
|
||||
# auto-start Syncthing at login.
|
||||
autoSignDarwinBinariesHook
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
env = {
|
||||
BUILD_USER = "nix";
|
||||
BUILD_HOST = "nix";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
(
|
||||
export GOOS="${pkgsBuildBuild.go.GOOS}" GOARCH="${pkgsBuildBuild.go.GOARCH}" CC=$CC_FOR_BUILD
|
||||
go build build.go
|
||||
go generate github.com/syncthing/syncthing/lib/api/auto github.com/syncthing/syncthing/cmd/infra/strelaypoolsrv/auto
|
||||
)
|
||||
./build -goos ${go.GOOS} -goarch ${go.GOARCH} -no-upgrade -version v${version} build ${target}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 ${target} $out/bin/${target}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
inherit postInstall;
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
inherit (nixosTests)
|
||||
syncthing
|
||||
syncthing-folders
|
||||
syncthing-guiPassword
|
||||
syncthing-guiPasswordFile
|
||||
syncthing-init
|
||||
syncthing-no-settings
|
||||
syncthing-relay
|
||||
;
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://syncthing.net/";
|
||||
description = "Open Source Continuous File Synchronization";
|
||||
changelog = "https://github.com/syncthing/syncthing/releases/tag/v${version}";
|
||||
license = lib.licenses.mpl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
joko
|
||||
peterhoeg
|
||||
];
|
||||
mainProgram = target;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
syncthing = common {
|
||||
stname = "syncthing";
|
||||
target = "syncthing";
|
||||
|
||||
postInstall = ''
|
||||
# This installs man pages in the correct directory according to the suffix
|
||||
# on the filename
|
||||
for mf in man/*.[1-9]; do
|
||||
mantype="$(echo "$mf" | awk -F"." '{print $NF}')"
|
||||
mandir="$out/share/man/man$mantype"
|
||||
install -Dm644 "$mf" "$mandir/$(basename "$mf")"
|
||||
done
|
||||
|
||||
install -Dm644 etc/linux-desktop/syncthing-ui.desktop $out/share/applications/syncthing-ui.desktop
|
||||
install -Dm644 assets/logo-32.png $out/share/icons/hicolor/32x32/apps/syncthing.png
|
||||
install -Dm644 assets/logo-64.png $out/share/icons/hicolor/64x64/apps/syncthing.png
|
||||
install -Dm644 assets/logo-128.png $out/share/icons/hicolor/128x128/apps/syncthing.png
|
||||
install -Dm644 assets/logo-256.png $out/share/icons/hicolor/256x256/apps/syncthing.png
|
||||
install -Dm644 assets/logo-512.png $out/share/icons/hicolor/512x512/apps/syncthing.png
|
||||
install -Dm644 assets/logo-only.svg $out/share/icons/hicolor/scalable/apps/syncthing.svg
|
||||
|
||||
''
|
||||
+ lib.optionalString (stdenv.hostPlatform.isLinux) ''
|
||||
mkdir -p $out/lib/systemd/{system,user}
|
||||
|
||||
substitute etc/linux-systemd/system/syncthing@.service \
|
||||
$out/lib/systemd/system/syncthing@.service \
|
||||
--replace-fail /usr/bin/syncthing $out/bin/syncthing
|
||||
|
||||
substitute etc/linux-systemd/user/syncthing.service \
|
||||
$out/lib/systemd/user/syncthing.service \
|
||||
--replace-fail /usr/bin/syncthing $out/bin/syncthing
|
||||
'';
|
||||
};
|
||||
|
||||
syncthing-discovery = common {
|
||||
stname = "syncthing-discovery";
|
||||
target = "stdiscosrv";
|
||||
};
|
||||
|
||||
syncthing-relay = common {
|
||||
stname = "syncthing-relay";
|
||||
target = "strelaysrv";
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform.isLinux) ''
|
||||
mkdir -p $out/lib/systemd/system
|
||||
|
||||
substitute cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
|
||||
$out/lib/systemd/system/strelaysrv.service \
|
||||
--replace-fail /usr/bin/strelaysrv $out/bin/strelaysrv
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -12,14 +12,14 @@
|
|||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "antimicrox";
|
||||
version = "3.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AntiMicroX";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
repo = "antimicrox";
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "sha256-ZIHhgyOpabWkdFZoha/Hj/1d8/b6qVolE6dn0xAFZVw=";
|
||||
};
|
||||
|
||||
|
|
@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
|
|||
udevCheckHook
|
||||
libsForQt5.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
libsForQt5.qttools
|
||||
|
|
@ -46,10 +47,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
meta = {
|
||||
description = "GUI for mapping keyboard and mouse controls to a gamepad";
|
||||
inherit (src.meta) homepage;
|
||||
inherit (finalAttrs.src.meta) homepage;
|
||||
maintainers = [ ];
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = with lib.platforms; linux;
|
||||
mainProgram = "antimicrox";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
fetchFromGitHub,
|
||||
autoreconfHook,
|
||||
automake,
|
||||
fftw,
|
||||
fftwSinglePrec,
|
||||
ladspa-header,
|
||||
libxml2,
|
||||
pkg-config,
|
||||
|
|
@ -39,8 +39,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
perlPackages.perl
|
||||
perlPackages.XMLParser
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fftw
|
||||
fftwSinglePrec
|
||||
ladspa-header
|
||||
libxml2
|
||||
];
|
||||
|
|
@ -2,10 +2,12 @@
|
|||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
cmake,
|
||||
lua,
|
||||
pkg-config,
|
||||
|
||||
rsync,
|
||||
lua5_2_compat,
|
||||
asciidoc,
|
||||
libxml2,
|
||||
docbook_xml_dtd_45,
|
||||
|
|
@ -17,14 +19,14 @@
|
|||
let
|
||||
xnu = darwin.sourceRelease "xnu";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lsyncd";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "axkibe";
|
||||
owner = "lsyncd";
|
||||
repo = "lsyncd";
|
||||
rev = "release-${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-QBmvS1HGF3VWS+5aLgDr9AmUfEsuSz+DTFIeql2XHH4=";
|
||||
};
|
||||
|
||||
|
|
@ -34,7 +36,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
# Special flags needed on Darwin:
|
||||
# https://github.com/axkibe/lsyncd/blob/42413cabbedca429d55a5378f6e830f191f3cc86/INSTALL#L51
|
||||
# https://github.com/lsyncd/lsyncd/blob/42413cabbedca429d55a5378f6e830f191f3cc86/INSTALL#L51
|
||||
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"-DWITH_INOTIFY=OFF"
|
||||
"-DWITH_FSEVENTS=ON"
|
||||
|
|
@ -47,9 +49,10 @@ stdenv.mkDerivation rec {
|
|||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
rsync
|
||||
lua
|
||||
lua5_2_compat
|
||||
asciidoc
|
||||
libxml2
|
||||
docbook_xml_dtd_45
|
||||
|
|
@ -58,11 +61,11 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/axkibe/lsyncd";
|
||||
homepage = "https://github.com/lsyncd/lsyncd";
|
||||
description = "Utility that synchronizes local directories with remote targets";
|
||||
mainProgram = "lsyncd";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ bobvanderlinden ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
@ -15,27 +15,27 @@ let
|
|||
];
|
||||
python = python3.withPackages (pkgs: pydeps);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "makehuman";
|
||||
version = "1.3.0";
|
||||
|
||||
source = fetchFromGitHub {
|
||||
owner = "makehumancommunity";
|
||||
repo = "makehuman";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-x0v/SkwtOl1lkVi2TRuIgx2Xgz4JcWD3He7NhU44Js4=";
|
||||
name = "${pname}-source";
|
||||
name = "makehuman-source";
|
||||
};
|
||||
|
||||
assets = fetchFromGitHub {
|
||||
owner = "makehumancommunity";
|
||||
repo = "makehuman-assets";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-Jd2A0PAHVdFMnDLq4Mu5wsK/E6A4QpKjUyv66ix1Gbo=";
|
||||
name = "${pname}-assets-source";
|
||||
name = "makehuman-assets-source";
|
||||
};
|
||||
|
||||
srcs = [
|
||||
srcs = with finalAttrs; [
|
||||
source
|
||||
assets
|
||||
];
|
||||
|
|
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
propagatedBuildInputs = pydeps;
|
||||
|
||||
finalSource = "${pname}-final";
|
||||
finalSource = "makehuman-final";
|
||||
|
||||
postUnpack = ''
|
||||
mkdir -p $finalSource
|
||||
|
|
@ -107,5 +107,6 @@ stdenv.mkDerivation rec {
|
|||
mainProgram = "makehuman";
|
||||
maintainers = with lib.maintainers; [ elisesouche ];
|
||||
platforms = lib.platforms.all;
|
||||
broken = true; # Added 2026-05-12
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@
|
|||
libsForQt5,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "QMediathekView";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adamreichold";
|
||||
repo = "QMediathekView";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
sha256 = "0i9hac9alaajbra3lx23m0iiq6ww4is00lpbzg5x70agjrwj0nd6";
|
||||
};
|
||||
|
||||
|
|
@ -40,11 +40,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
meta = {
|
||||
description = "Alternative Qt-based front-end for the database maintained by the MediathekView project";
|
||||
inherit (src.meta) homepage;
|
||||
inherit (finalAttrs.src.meta) homepage;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
broken = stdenv.hostPlatform.isAarch64;
|
||||
mainProgram = "QMediathekView";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -6,18 +6,18 @@
|
|||
sudo,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "qsudo";
|
||||
version = "2020.03.27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "project-trident";
|
||||
repo = "qsudo";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
sha256 = "06kg057vwkvafnk69m9rar4wih3vq4h36wbzwbfc2kndsnn47lfl";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/src-qt5";
|
||||
sourceRoot = "${finalAttrs.src.name}/src-qt5";
|
||||
|
||||
nativeBuildInputs = [
|
||||
libsForQt5.qmake
|
||||
|
|
@ -41,4 +41,4 @@ stdenv.mkDerivation rec {
|
|||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.romildo ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@
|
|||
qemu,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "qtemu";
|
||||
version = "2.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "qtemu";
|
||||
repo = "gui";
|
||||
rev = version;
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "1555178mkfw0gwmw8bsxmg4339j2ifp0yb4b2f39nxh9hwshg07j";
|
||||
};
|
||||
|
||||
|
|
@ -51,4 +51,4 @@ stdenv.mkDerivation rec {
|
|||
maintainers = with lib.maintainers; [ romildo ];
|
||||
mainProgram = "qtemu";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,31 +3,37 @@
|
|||
stdenv,
|
||||
fetchpatch,
|
||||
fetchurl,
|
||||
|
||||
updateAutotoolsGnuConfigScriptsHook,
|
||||
perl,
|
||||
|
||||
libiconv,
|
||||
zlib,
|
||||
popt,
|
||||
enableACLs ? lib.meta.availableOn stdenv.hostPlatform acl,
|
||||
|
||||
config,
|
||||
|
||||
enableACLs ? config.rsync.enableACLs or (lib.meta.availableOn stdenv.hostPlatform acl),
|
||||
acl,
|
||||
enableLZ4 ? true,
|
||||
enableLZ4 ? config.rsync.enableLZ4 or true,
|
||||
lz4,
|
||||
enableOpenSSL ? true,
|
||||
enableOpenSSL ? config.rsync.enableOpenSSL or true,
|
||||
openssl,
|
||||
enableXXHash ? true,
|
||||
enableXXHash ? config.rsync.enableXXHash or true,
|
||||
xxhash,
|
||||
enableZstd ? true,
|
||||
enableZstd ? config.rsync.enableZstd or true,
|
||||
zstd,
|
||||
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rsync";
|
||||
version = "3.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
# signed with key 9FEF 112D CE19 A0DC 7E88 2CB8 1BB2 4997 A853 5F6F
|
||||
url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
|
||||
url = "mirror://samba/rsync/src/rsync-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-KSS8s6Hti1UfwQH3QLnw/gogKxFQJ2R89phQ1l/YjFI=";
|
||||
};
|
||||
|
||||
|
|
@ -95,8 +101,8 @@ stdenv.mkDerivation rec {
|
|||
platforms = lib.platforms.unix;
|
||||
identifiers.cpeParts = {
|
||||
vendor = "samba";
|
||||
inherit version;
|
||||
inherit (finalAttrs) version;
|
||||
update = "-";
|
||||
};
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
@ -1,23 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
cmake,
|
||||
gmp,
|
||||
pkg-config,
|
||||
sail,
|
||||
ninja,
|
||||
|
||||
z3,
|
||||
cmake,
|
||||
ninja,
|
||||
pkg-config,
|
||||
ocamlPackages,
|
||||
|
||||
gmp,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sail-riscv";
|
||||
version = "0.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "riscv";
|
||||
repo = "sail-riscv";
|
||||
rev = version;
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-50ATe3DQcdyNOqP85mEMyEwxzpBOplzRN9ulaJNo9zo=";
|
||||
};
|
||||
|
||||
|
|
@ -26,7 +28,7 @@ stdenv.mkDerivation rec {
|
|||
cmake
|
||||
pkg-config
|
||||
ninja
|
||||
sail
|
||||
ocamlPackages.sail
|
||||
];
|
||||
buildInputs = [
|
||||
gmp
|
||||
|
|
@ -42,4 +44,4 @@ stdenv.mkDerivation rec {
|
|||
maintainers = [ ];
|
||||
license = lib.licenses.bsd2;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
@ -16,7 +16,8 @@
|
|||
soxr,
|
||||
aixlog,
|
||||
popl,
|
||||
pulseaudioSupport ? false,
|
||||
config,
|
||||
pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux,
|
||||
pipewireSupport ? stdenv.hostPlatform.isLinux,
|
||||
libpulseaudio,
|
||||
pipewire,
|
||||
10
pkgs/by-name/sy/syncthing-discovery/package.nix
Normal file
10
pkgs/by-name/sy/syncthing-discovery/package.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
syncthing,
|
||||
}:
|
||||
(syncthing.override {
|
||||
target = "stdiscosrv";
|
||||
}).overrideAttrs
|
||||
{
|
||||
pname = "syncthing-discovery";
|
||||
postInstall = "";
|
||||
}
|
||||
19
pkgs/by-name/sy/syncthing-relay/package.nix
Normal file
19
pkgs/by-name/sy/syncthing-relay/package.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
syncthing,
|
||||
}:
|
||||
|
||||
(syncthing.override {
|
||||
target = "strelaysrv";
|
||||
}).overrideAttrs
|
||||
{
|
||||
pname = "syncthing-relay";
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform.isLinux) ''
|
||||
mkdir -p $out/lib/systemd/system
|
||||
|
||||
substitute cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
|
||||
$out/lib/systemd/system/strelaysrv.service \
|
||||
--replace-fail /usr/bin/strelaysrv $out/bin/strelaysrv
|
||||
'';
|
||||
}
|
||||
126
pkgs/by-name/sy/syncthing/package.nix
Normal file
126
pkgs/by-name/sy/syncthing/package.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
pkgsBuildBuild,
|
||||
|
||||
go,
|
||||
darwin,
|
||||
nixosTests,
|
||||
|
||||
nix-update-script,
|
||||
|
||||
target ? "syncthing",
|
||||
}:
|
||||
|
||||
assert builtins.elem target [
|
||||
"syncthing"
|
||||
"stdiscosrv" # syncthing-discovery
|
||||
"strelaysrv" # syncthing-relay
|
||||
];
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "syncthing";
|
||||
version = "2.0.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "syncthing";
|
||||
repo = "syncthing";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-v77ovjV+UoCRA1GteP+HDqC8dsRvtOhFX/IkSgSIf8Y=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-boYTLgvH+iWlh3y3Z0LPvSVGEget3X94AthtJKphhCw=";
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Recent versions of macOS seem to require binaries to be signed when
|
||||
# run from Launch Agents/Daemons, even on x86 devices where it has a
|
||||
# more lax code signing policy compared to Apple Silicon. So just sign
|
||||
# the binaries on both architectures to make it possible for launchd to
|
||||
# auto-start Syncthing at login.
|
||||
darwin.autoSignDarwinBinariesHook
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
env = {
|
||||
BUILD_USER = "nix";
|
||||
BUILD_HOST = "nix";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
(
|
||||
export GOOS="${pkgsBuildBuild.go.GOOS}" GOARCH="${pkgsBuildBuild.go.GOARCH}" CC=$CC_FOR_BUILD
|
||||
go build build.go
|
||||
go generate github.com/syncthing/syncthing/lib/api/auto github.com/syncthing/syncthing/cmd/infra/strelaypoolsrv/auto
|
||||
)
|
||||
./build -goos ${go.GOOS} -goarch ${go.GOARCH} -no-upgrade -version v${finalAttrs.version} build ${target}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 ${target} $out/bin/${target}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# This installs man pages in the correct directory according to the suffix
|
||||
# on the filename
|
||||
for mf in man/*.[1-9]; do
|
||||
mantype="$(echo "$mf" | awk -F"." '{print $NF}')"
|
||||
mandir="$out/share/man/man$mantype"
|
||||
install -Dm644 "$mf" "$mandir/$(basename "$mf")"
|
||||
done
|
||||
|
||||
install -Dm644 etc/linux-desktop/syncthing-ui.desktop $out/share/applications/syncthing-ui.desktop
|
||||
install -Dm644 assets/logo-32.png $out/share/icons/hicolor/32x32/apps/syncthing.png
|
||||
install -Dm644 assets/logo-64.png $out/share/icons/hicolor/64x64/apps/syncthing.png
|
||||
install -Dm644 assets/logo-128.png $out/share/icons/hicolor/128x128/apps/syncthing.png
|
||||
install -Dm644 assets/logo-256.png $out/share/icons/hicolor/256x256/apps/syncthing.png
|
||||
install -Dm644 assets/logo-512.png $out/share/icons/hicolor/512x512/apps/syncthing.png
|
||||
install -Dm644 assets/logo-only.svg $out/share/icons/hicolor/scalable/apps/syncthing.svg
|
||||
|
||||
''
|
||||
+ lib.optionalString (stdenv.hostPlatform.isLinux) ''
|
||||
mkdir -p $out/lib/systemd/{system,user}
|
||||
|
||||
substitute etc/linux-systemd/system/syncthing@.service \
|
||||
$out/lib/systemd/system/syncthing@.service \
|
||||
--replace-fail /usr/bin/syncthing $out/bin/syncthing
|
||||
|
||||
substitute etc/linux-systemd/user/syncthing.service \
|
||||
$out/lib/systemd/user/syncthing.service \
|
||||
--replace-fail /usr/bin/syncthing $out/bin/syncthing
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
inherit (nixosTests)
|
||||
syncthing
|
||||
syncthing-folders
|
||||
syncthing-guiPassword
|
||||
syncthing-guiPasswordFile
|
||||
syncthing-init
|
||||
syncthing-no-settings
|
||||
syncthing-relay
|
||||
;
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://syncthing.net/";
|
||||
description = "Open Source Continuous File Synchronization";
|
||||
changelog = "https://github.com/syncthing/syncthing/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mpl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
joko
|
||||
peterhoeg
|
||||
];
|
||||
mainProgram = target;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
|
|
@ -2540,7 +2540,7 @@ with pkgs;
|
|||
|
||||
kbfs = callPackage ../tools/security/keybase/kbfs.nix { };
|
||||
|
||||
kbdVlock = callPackage ../../pkgs/by-name/kb/kbd/package.nix { withVlock = true; };
|
||||
kbdVlock = callPackage ../by-name/kb/kbd/package.nix { withVlock = true; };
|
||||
|
||||
keybase-gui = callPackage ../tools/security/keybase/gui.nix { };
|
||||
|
||||
|
|
@ -2565,10 +2565,6 @@ with pkgs;
|
|||
|
||||
logstash-contrib = callPackage ../tools/misc/logstash/contrib.nix { };
|
||||
|
||||
lsyncd = callPackage ../applications/networking/sync/lsyncd {
|
||||
lua = lua5_2_compat;
|
||||
};
|
||||
|
||||
lagrange-tui = lagrange.override { enableTUI = true; };
|
||||
|
||||
kzipmix = pkgsi686Linux.callPackage ../tools/compression/kzipmix { };
|
||||
|
|
@ -3153,10 +3149,6 @@ with pkgs;
|
|||
|
||||
# aka., pgp-tools
|
||||
|
||||
snapcast = callPackage ../applications/audio/snapcast {
|
||||
pulseaudioSupport = config.pulseaudio or stdenv.hostPlatform.isLinux;
|
||||
};
|
||||
|
||||
specup = haskellPackages.specup.bin;
|
||||
|
||||
spglib = callPackage ../development/libraries/spglib {
|
||||
|
|
@ -9472,10 +9464,6 @@ with pkgs;
|
|||
callPackage ../applications/networking/cluster/helm/plugins { }
|
||||
);
|
||||
|
||||
ladspaPlugins = callPackage ../applications/audio/ladspa-plugins {
|
||||
fftw = fftwSinglePrec;
|
||||
};
|
||||
|
||||
libreoffice-bin = callPackage ../applications/office/libreoffice/darwin { };
|
||||
|
||||
libreoffice = hiPrio libreoffice-still;
|
||||
|
|
@ -9888,9 +9876,6 @@ with pkgs;
|
|||
|
||||
rstudio-server = rstudio.override { server = true; };
|
||||
|
||||
rsync = callPackage ../applications/networking/sync/rsync (config.rsync or { });
|
||||
rrsync = callPackage ../applications/networking/sync/rsync/rrsync.nix { };
|
||||
|
||||
inherit (callPackages ../applications/radio/rtl-sdr { })
|
||||
rtl-sdr-librtlsdr
|
||||
rtl-sdr-osmocom
|
||||
|
|
@ -9989,15 +9974,6 @@ with pkgs;
|
|||
waylandSupport = true;
|
||||
};
|
||||
|
||||
inherit
|
||||
(callPackages ../applications/networking/syncthing {
|
||||
inherit (darwin) autoSignDarwinBinariesHook;
|
||||
})
|
||||
syncthing
|
||||
syncthing-discovery
|
||||
syncthing-relay
|
||||
;
|
||||
|
||||
synergyWithoutGUI = synergy.override { withGUI = false; };
|
||||
|
||||
tabbed = callPackage ../applications/window-managers/tabbed {
|
||||
|
|
@ -11581,10 +11557,6 @@ with pkgs;
|
|||
waylandSupport = true;
|
||||
};
|
||||
|
||||
sail-riscv = callPackage ../applications/virtualization/sail-riscv {
|
||||
inherit (ocamlPackages) sail;
|
||||
};
|
||||
|
||||
mfcj470dwlpr = pkgsi686Linux.callPackage ../misc/cups/drivers/mfcj470dwlpr { };
|
||||
|
||||
mfcj6510dwlpr = pkgsi686Linux.callPackage ../misc/cups/drivers/mfcj6510dwlpr { };
|
||||
|
|
@ -11725,7 +11697,7 @@ with pkgs;
|
|||
discord-development
|
||||
;
|
||||
|
||||
torcs-without-data = callPackage ../../pkgs/by-name/to/torcs/without-data.nix { };
|
||||
torcs-without-data = callPackage ../by-name/to/torcs/without-data.nix { };
|
||||
|
||||
nitrokey-app2 = python3Packages.callPackage ../tools/security/nitrokey-app2 { };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue