about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/fr
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-01-20 12:31:50 +0100
committerAlyssa Ross <hi@alyssa.is>2024-01-20 12:32:25 +0100
commitb7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch)
treea6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/by-name/fr
parent710028664e26e85cb831a869b3da9f6993902255 (diff)
parent0799f514b1cd74878174939df79ac60ca5036673 (diff)
downloadnixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/fr')
-rw-r--r--nixpkgs/pkgs/by-name/fr/freefilesync/package.nix138
-rw-r--r--nixpkgs/pkgs/by-name/fr/fretboard/package.nix62
-rw-r--r--nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch14
-rw-r--r--nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix52
4 files changed, 266 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/fr/freefilesync/package.nix b/nixpkgs/pkgs/by-name/fr/freefilesync/package.nix
new file mode 100644
index 000000000000..6458fc58dcdc
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/fr/freefilesync/package.nix
@@ -0,0 +1,138 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, fetchDebianPatch
+, copyDesktopItems
+, pkg-config
+, wrapGAppsHook
+, unzip
+, curl
+, glib
+, gtk3
+, libssh2
+, openssl
+, wxGTK32
+, makeDesktopItem
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "freefilesync";
+  version = "13.3";
+
+  src = fetchurl {
+    url = "https://freefilesync.org/download/FreeFileSync_${finalAttrs.version}_Source.zip";
+    # The URL only redirects to the file on the second attempt
+    postFetch = ''
+      rm -f $out
+      tryDownload "$url"
+    '';
+    hash = "sha256-mpCCecG1teBjIJqCzB3pGAQKT6t8bMKbK8KihMXOn3g=";
+  };
+
+  sourceRoot = ".";
+
+  # Patches from Debian
+  patches = [
+    # Disable loading of the missing Animal.dat
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/f/freefilesync/13.3-1/debian/patches/ffs_devuan.patch";
+      excludes = [ "FreeFileSync/Source/ffs_paths.cpp" ];
+      hash = "sha256-cW0Y9+ByQWGzMU4NFRSkW46KkxQB4jRZotHlCFniv5o=";
+    })
+    # Fix build with GTK 3
+    (fetchDebianPatch {
+      pname = "freefilesync";
+      version = "13.3";
+      debianRevision = "1";
+      patch = "ffs_devuan_gtk3.patch";
+      hash = "sha256-0n58Np4JI3hYK/CRBytkPHl9Jp4xK+IRjgUvoYti/f4=";
+    })
+    # Fix build with vanilla wxWidgets
+    (fetchDebianPatch {
+      pname = "freefilesync";
+      version = "13.3";
+      debianRevision = "1";
+      patch = "Disable_wxWidgets_uncaught_exception_handling.patch";
+      hash = "sha256-Fem7eDDKSqPFU/t12Jco8OmYC8FM9JgB4/QVy/ouvbI=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    copyDesktopItems
+    pkg-config
+    wrapGAppsHook
+    unzip
+  ];
+
+  buildInputs = [
+    curl
+    glib
+    gtk3
+    libssh2
+    openssl
+    wxGTK32
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Undef g_object_ref on GLib 2.56+
+    "-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_54"
+    "-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_54"
+    # Define libssh2 constants
+    "-DMAX_SFTP_READ_SIZE=30000"
+    "-DMAX_SFTP_OUTGOING_SIZE=30000"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    chmod +w FreeFileSync/Build
+    cd FreeFileSync/Source
+    make -j$NIX_BUILD_CORES
+    cd RealTimeSync
+    make -j$NIX_BUILD_CORES
+    cd ../../..
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp -R FreeFileSync/Build/* $out
+    mv $out/{Bin,bin}
+
+    mkdir -p $out/share/pixmaps
+    unzip -j $out/Resources/Icons.zip '*Sync.png' -d $out/share/pixmaps
+
+    runHook postInstall
+  '';
+
+  desktopItems = [
+    (makeDesktopItem rec {
+      name = "FreeFileSync";
+      desktopName = name;
+      genericName = "Folder Comparison and Synchronization";
+      icon = name;
+      exec = name;
+      categories = [ "Utility" "FileTools" ];
+    })
+    (makeDesktopItem rec {
+      name = "RealTimeSync";
+      desktopName = name;
+      genericName = "Automated Synchronization";
+      icon = name;
+      exec = name;
+      categories = [ "Utility" "FileTools" ];
+    })
+  ];
+
+  meta = with lib; {
+    description = "Open Source File Synchronization & Backup Software";
+    homepage = "https://freefilesync.org";
+    license = [ licenses.gpl3Only licenses.openssl licenses.curl licenses.libssh2 ];
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/by-name/fr/fretboard/package.nix b/nixpkgs/pkgs/by-name/fr/fretboard/package.nix
new file mode 100644
index 000000000000..093ad1ac8d67
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/fr/fretboard/package.nix
@@ -0,0 +1,62 @@
+{ lib
+, blueprint-compiler
+, cargo
+, desktop-file-utils
+, fetchFromGitHub
+, glib
+, gtk4
+, libadwaita
+, meson
+, ninja
+, pkg-config
+, rustPlatform
+, rustc
+, stdenv
+, wrapGAppsHook4
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fretboard";
+  version = "5.3";
+
+  src = fetchFromGitHub {
+    owner = "bragefuglseth";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-wwq4Xq6IVLF2hICk9HfCpfxpWer8PNWywD8p3wQdp6U=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-H/dAKaYHxRmldny8EoasrcDROZhLo5UbHPAoMicDehA=";
+  };
+
+  nativeBuildInputs = [
+    blueprint-compiler
+    cargo
+    desktop-file-utils
+    meson
+    ninja
+    pkg-config
+    rustPlatform.cargoSetupHook
+    rustc
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    glib
+    gtk4
+    libadwaita
+  ];
+
+  meta = with lib; {
+    description = "Look up guitar chords";
+    homepage = "https://github.com/bragefuglseth/fretboard";
+    changelog = "https://github.com/bragefuglseth/fretboard/releases/tag/v${version}";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ michaelgrahamevans ];
+    mainProgram = "fretboard";
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch b/nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch
new file mode 100644
index 000000000000..e13e78f2d184
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch
@@ -0,0 +1,14 @@
+diff --git a/pyproject.toml b/pyproject.toml
+index ffad1a4..e7551da 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -44,6 +44,9 @@ coverage = ">=6.4.4,<8.0.0"
+ pytest-cov = ">=3,<5"
+ ruff = "^0.1.7"
+ 
++[tool.poetry.scripts]
++fritzexporter = "fritzexporter.__main__:main"
++
+ [build-system]
+ requires = ["poetry-core"]
+ build-backend = "poetry.core.masonry.api"
diff --git a/nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix b/nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix
new file mode 100644
index 000000000000..3306802b840f
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix
@@ -0,0 +1,52 @@
+{ lib
+, python3
+, fetchFromGitHub
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "fritz-exporter";
+  version = "2.3.1";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "pdreker";
+    repo = "fritz_exporter";
+    rev = "fritzexporter-v${version}";
+    hash = "sha256-Dv/2Og1OJV7canZ8Y5Pai5gPRUvcRDYmSGoD2pnAkSs=";
+  };
+
+  patches = [
+    # https://github.com/pdreker/fritz_exporter/pull/282
+    ./console-script.patch
+  ];
+
+  postPatch = ''
+    # don't test coverage
+    sed -i "/^addopts/d" pyproject.toml
+  '';
+
+  nativeBuildInputs = with python3.pkgs; [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    attrs
+    fritzconnection
+    prometheus-client
+    pyyaml
+    requests
+  ];
+
+  nativeCheckInputs = with python3.pkgs; [
+    pytestCheckHook
+  ];
+
+  meta = {
+    changelog = "https://github.com/pdreker/fritz_exporter/blob/${src.rev}/CHANGELOG.md";
+    description = "Prometheus exporter for Fritz!Box home routers";
+    homepage = "https://github.com/pdreker/fritz_exporter";
+    license = lib.licenses.asl20;
+    mainProgram = "fritzexporter";
+    maintainers = with lib.maintainers; [ marie ];
+  };
+}