mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-05 20:43:28 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
63 lines
1.2 KiB
Nix
63 lines
1.2 KiB
Nix
{
|
|
buildGo123Module,
|
|
buildNpmPackage,
|
|
fetchFromGitHub,
|
|
lib,
|
|
}:
|
|
|
|
let
|
|
version = "2.31.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "filebrowser";
|
|
repo = "filebrowser";
|
|
rev = "v${version}";
|
|
hash = "sha256-zLM1fLrucIhzGdTTDu81ZnTIipK+iRnPhgfMiT1P+yg=";
|
|
};
|
|
|
|
frontend = buildNpmPackage rec {
|
|
pname = "filebrowser-frontend";
|
|
inherit version src;
|
|
|
|
sourceRoot = "${src.name}/frontend";
|
|
|
|
npmDepsHash = "sha256-5/yEMWkNPAS8/PkaHlPBGFLiJu7xK2GHYo5dYqHAfCE=";
|
|
|
|
NODE_OPTIONS = "--openssl-legacy-provider";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir $out
|
|
mv dist $out
|
|
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
in
|
|
buildGo123Module {
|
|
pname = "filebrowser";
|
|
inherit version src;
|
|
|
|
vendorHash = "sha256-N5aUs8rgTYXeb0qJhPQBCa6lUDkT6lH1bh+1u4bixos=";
|
|
|
|
excludedPackages = [ "tools" ];
|
|
|
|
preBuild = ''
|
|
cp -r ${frontend}/dist frontend/
|
|
'';
|
|
|
|
passthru = {
|
|
inherit frontend;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Filebrowser is a web application for managing files and directories";
|
|
homepage = "https://filebrowser.org";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ oakenshield ];
|
|
mainProgram = "filebrowser";
|
|
};
|
|
}
|
|
|