From 48cc65d04ca013bfe3b97a512b73afe47ff3202c Mon Sep 17 00:00:00 2001 From: onahp Date: Thu, 28 Nov 2024 02:30:23 +1300 Subject: [PATCH 1/2] filen-cli: init at 0.0.19 --- maintainers/maintainer-list.nix | 6 ++ pkgs/applications/networking/filen/cli.nix | 85 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 93 insertions(+) create mode 100644 pkgs/applications/networking/filen/cli.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c097a638d9f50..ce586eb7e4271 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -16407,6 +16407,12 @@ githubId = 1538622; name = "Michael Reilly"; }; + onahp = { + name = "Setephano Noovao"; + email = "onahp@pm.me"; + github = "onahp"; + githubId = 54986259; + }; ondt = { name = "Ondrej Telka"; email = "nix@ondt.dev"; diff --git a/pkgs/applications/networking/filen/cli.nix b/pkgs/applications/networking/filen/cli.nix new file mode 100644 index 0000000000000..05312e96de404 --- /dev/null +++ b/pkgs/applications/networking/filen/cli.nix @@ -0,0 +1,85 @@ +{ + stdenv, + lib, + fetchurl, + file, +}: + +stdenv.mkDerivation rec { + owner = "FilenCloudDienste"; + pname = "filen-cli"; + version = "0.0.19"; + + # Define platform-specific source URL + src = + if stdenv.hostPlatform.system == "x86_64-linux" then + fetchurl { + url = "https://github.com/${owner}/${pname}/releases/download/v${version}/${pname}-v${version}-linux-x64"; + sha256 = "sha256-8y58HV82uDGhHDziCyhwcHaecactY331Ztbw+uq7oh4="; + } + else if stdenv.hostPlatform.system == "aarch64-linux" then + fetchurl { + url = "https://github.com/${owner}/${pname}/releases/download/v${version}/${pname}-v${version}-linux-arm64"; + sha256 = "sha256-Ee8MnwTKlHvZzK7PHoE9xft4WeeAw9qTnjk/1dcyhMY="; + } + + else if stdenv.hostPlatform.system == "x86_64-darwin" then + fetchurl { + url = "https://github.com/${owner}/${pname}/releases/download/v${version}/${pname}-v${version}-macos-x64"; + sha256 = "sha256-J721M6VE74iZYavp9VpzpMQSMsBB4fAlu7djgceMWE4="; + } + + else if stdenv.hostPlatform.system == "x86_64-windows" then + fetchurl { + url = "https://github.com/${owner}/${pname}/releases/download/v${version}/${pname}-v${version}-win-x64"; + sha256 = "sha256-ra2qbveLypV2ztDobhhOSneD3ORkuCqNy7i0k6K/7yg="; + } + + else + throw "Unsupported platform: ${stdenv.hostPlatform.system}"; + + buildInputs = [ file ]; + doCheck = false; + + unpackPhase = ":"; + configurePhase = ":"; + + # create relevant dir for single binary + buildPhase = # bash + '' + mkdir -p $out/bin + ''; + + # install built-in artifacts into $out + installPhase = # bash + '' + cp $src $out/bin/${pname} + chmod +x $out/bin/${pname} + ''; + + fixupPhase = ":"; + + # verify the installed files + installCheckPhase = # bash + '' + ls -al $out/bin/ + ${file} $out/bin/${pname} + ''; + + meta = with lib; { + description = "A headless CLI that provides a set of useful tools for interacting with Filen cloud storage securely"; + longDescription = '' + The filen-cli is a fully featured CLI that gives you access to your files using an interactive + and scriptable CLI in a headless environment. Perfect for advanced users who want more control + over their data from the terminal. Features include: + - WebDAV and S3 + - Network drive mounting + - Fast file management like 'ls', 'mv' and many more. + ''; + homepage = "https://filen.io"; + license = licenses.agpl3Only; + mainProgram = "filen-cli"; + platforms = platforms.unix; + maintainers = [ maintainers.onahp ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4b64198132414..ea0740e236ad7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15669,6 +15669,8 @@ with pkgs; dropbox-cli = callPackage ../applications/networking/dropbox/cli.nix { }; + filen-cli = callPackage ../applications/networking/filen/cli.nix { }; + maestral = with python3Packages; toPythonApplication maestral; maestral-gui = qt6Packages.callPackage ../applications/networking/maestral-qt { }; From 9adf5340022a2c02fcb19b029f4680777d8cc8b8 Mon Sep 17 00:00:00 2001 From: onahp Date: Thu, 28 Nov 2024 03:40:42 +1300 Subject: [PATCH 2/2] fix(nixpkgs-vet): applying recommended changes from ci --- .../filen/cli.nix => by-name/fi/filen-cli/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/networking/filen/cli.nix => by-name/fi/filen-cli/package.nix} (100%) diff --git a/pkgs/applications/networking/filen/cli.nix b/pkgs/by-name/fi/filen-cli/package.nix similarity index 100% rename from pkgs/applications/networking/filen/cli.nix rename to pkgs/by-name/fi/filen-cli/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ea0740e236ad7..4b64198132414 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15669,8 +15669,6 @@ with pkgs; dropbox-cli = callPackage ../applications/networking/dropbox/cli.nix { }; - filen-cli = callPackage ../applications/networking/filen/cli.nix { }; - maestral = with python3Packages; toPythonApplication maestral; maestral-gui = qt6Packages.callPackage ../applications/networking/maestral-qt { };