* add Nix support * fix formatter output * mention Nix in README * fix common import * fix frontend old version import * clarified flake pkgs order * rm old dataDir option * comment typo * fix password assertion * rm old User/Group logic * rewrite assertion boolean expr * General flake touchup - Rewrite `callPackage` exprs to be more readable - Add pre-commit support for devShell - Add direnv support * add simple test * use correct test func
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ yt-dlp-web-ui-frontend, buildGoModule, lib, makeWrapper, yt-dlp, ... }:
|
|
let
|
|
fs = lib.fileset;
|
|
common = import ./common.nix { inherit lib; };
|
|
in
|
|
buildGoModule {
|
|
pname = "yt-dlp-web-ui";
|
|
inherit (common) version;
|
|
src = fs.toSource rec {
|
|
root = ../.;
|
|
fileset = fs.difference root (fs.unions [
|
|
### LIST OF FILES TO IGNORE ###
|
|
# frontend (this is included by the frontend.nix drv instead)
|
|
../frontend
|
|
# documentation
|
|
../examples
|
|
# docker
|
|
../Dockerfile
|
|
../docker-compose.yml
|
|
# nix
|
|
./devShell.nix
|
|
../.envrc
|
|
./tests
|
|
# make
|
|
../Makefile # this derivation does not use the project Makefile
|
|
# repo commons
|
|
../.github
|
|
../README.md
|
|
../LICENSE.md
|
|
../.gitignore
|
|
../.vscode
|
|
]);
|
|
};
|
|
|
|
# https://github.com/golang/go/issues/44507
|
|
preBuild = ''
|
|
cp -r ${yt-dlp-web-ui-frontend} frontend
|
|
'';
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/yt-dlp-web-ui \
|
|
--prefix PATH : ${lib.makeBinPath [ yt-dlp ]}
|
|
'';
|
|
|
|
vendorHash = "sha256-guM/U9DROJMx2ctPKBQis1YRhaf6fKvvwEWgswQKMG0=";
|
|
|
|
meta = common.meta // {
|
|
mainProgram = "yt-dlp-web-ui";
|
|
};
|
|
}
|