Merge pull request #148054 from hyshka/psitransfer

This commit is contained in:
Sandro 2021-12-10 02:14:15 +01:00 committed by GitHub
commit 605bf1b3c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1787 additions and 0 deletions

View file

@ -0,0 +1,42 @@
# To update package version:
# 1. Change version string in node-package.json and this file
# 2. Run `./generate.sh` to rebuild node dependencies with node2nix
# 3. Build this package `nix-build -A psitransfer`
# 4. Profit
{ stdenv
, pkgs
, lib
, nodejs
, fetchzip
}:
let
nodePackages = import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
psitransfer = lib.head (lib.attrValues nodePackages);
combined = psitransfer.override rec {
# version is not defined in source package.json
# version must also be maintained in node-packages.json for node2nix
version = "2.0.1";
# override node2nix package src to pull pre-built release of same version
src = fetchzip {
url = "https://github.com/psi-4ward/psitransfer/releases/download/v${version}/psitransfer-v${version}.tar.gz";
sha256 = "mfldWTVmfcIRa+1g8YDnQqem5YmrFRfCxJoitWcXvns=";
stripRoot = false;
};
meta = with lib; {
homepage = "https://github.com/psi-4ward/psitransfer";
description = "Simple open source self-hosted file sharing solution";
license = licenses.bsd2;
maintainers = with maintainers; [ hyshka ];
};
};
in
combined

View file

@ -0,0 +1,10 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix
set -euo pipefail
node2nix \
--input node-packages.json \
--output node-packages.nix \
--composition node-composition.nix \
--node-env ../../development/node-packages/node-env.nix \
;

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
let
nodeEnv = import ../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View file

@ -0,0 +1,3 @@
[
{ "psitransfer": "git+https://github.com/psi-4ward/psitransfer#v2.0.1" }
]

1713
pkgs/servers/psitransfer/node-packages.nix generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -8716,6 +8716,8 @@ with pkgs;
plex = callPackage ../servers/plex { }; plex = callPackage ../servers/plex { };
plexRaw = callPackage ../servers/plex/raw.nix { }; plexRaw = callPackage ../servers/plex/raw.nix { };
psitransfer = callPackage ../servers/psitransfer { };
tab = callPackage ../tools/text/tab { }; tab = callPackage ../tools/text/tab { };
tabview = with python3Packages; toPythonApplication tabview; tabview = with python3Packages; toPythonApplication tabview;