3
0
Fork 0
forked from mirrors/nixpkgs

psitransfer: init at 2.0.1

Add new package psitransfer, a nodejs file-sharing web app.

Issue: #123383
This commit is contained in:
Bryan Hyshka 2021-11-25 08:12:03 -07:00
parent cdaa4ce25b
commit b1675725b0
No known key found for this signature in database
GPG key ID: DB2D93D1BFAAA6EA
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

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