mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
Merge 231b6625ee
into 43a19779c1
This commit is contained in:
commit
9960ed1e2b
29
README.md
29
README.md
|
@ -2344,7 +2344,7 @@ some recommended dependencies are enabled by default; [override the package](htt
|
||||||
|
|
||||||
## nixos module
|
## nixos module
|
||||||
|
|
||||||
for this setup, you will need a [flake-enabled](https://nixos.wiki/wiki/Flakes) installation of NixOS.
|
for [flake-enabled](https://nixos.wiki/wiki/Flakes) installations of NixOS:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
|
@ -2371,6 +2371,33 @@ for this setup, you will need a [flake-enabled](https://nixos.wiki/wiki/Flakes)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
if you don't use a flake in your configuration, you can use other dependency management tools like [npins](https://github.com/andir/npins), [niv](https://github.com/nmattia/niv), or even plain [`fetchTarball`](https://nix.dev/manual/nix/stable/language/builtins#builtins-fetchTarball), like so:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# npins example, adjust for your setup. copyparty should be a path to the downloaded repo
|
||||||
|
# for niv, just replace the npins folder import with the sources.nix file
|
||||||
|
copyparty = (import ./npins).copyparty;
|
||||||
|
|
||||||
|
# or with fetchTarball:
|
||||||
|
copyparty = fetchTarball "https://github.com/9001/copyparty/archive/hovudstraum.tar.gz";
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
# load the copyparty NixOS module
|
||||||
|
imports = [ "${copyparty}/contrib/nixos/modules/copyparty.nix" ];
|
||||||
|
|
||||||
|
# add the copyparty overlay to expose the package to the module
|
||||||
|
nixpkgs.overlays = [ "${copyparty}/contrib/package/nix/overlay.nix" ];
|
||||||
|
# (optional) install the package globally
|
||||||
|
environment.systemPackages = [ pkgs.copyparty ];
|
||||||
|
# configure the copyparty module
|
||||||
|
services.copyparty.enable = true;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
copyparty on NixOS is configured via `services.copyparty` options, for example:
|
copyparty on NixOS is configured via `services.copyparty` options, for example:
|
||||||
```nix
|
```nix
|
||||||
services.copyparty = {
|
services.copyparty = {
|
||||||
|
|
13
contrib/package/nix/overlay.nix
Normal file
13
contrib/package/nix/overlay.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
final: prev: rec {
|
||||||
|
copyparty = final.python3.pkgs.callPackage ./copyparty {
|
||||||
|
ffmpeg = final.ffmpeg-full;
|
||||||
|
};
|
||||||
|
|
||||||
|
partyfuse = prev.callPackage ./partyfuse {
|
||||||
|
inherit copyparty;
|
||||||
|
};
|
||||||
|
|
||||||
|
u2c = prev.callPackage ./u2c {
|
||||||
|
inherit copyparty;
|
||||||
|
};
|
||||||
|
}
|
25
flake.nix
25
flake.nix
|
@ -12,30 +12,13 @@
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
nixosModules.default = ./contrib/nixos/modules/copyparty.nix;
|
nixosModules.default = ./contrib/nixos/modules/copyparty.nix;
|
||||||
overlays.default = final: prev: rec {
|
overlays.default = import ./contrib/package/nix/overlay.nix;
|
||||||
copyparty = final.python3.pkgs.callPackage ./contrib/package/nix/copyparty {
|
|
||||||
ffmpeg = final.ffmpeg-full;
|
|
||||||
};
|
|
||||||
|
|
||||||
partyfuse = prev.callPackage ./contrib/package/nix/partyfuse {
|
|
||||||
inherit copyparty;
|
|
||||||
};
|
|
||||||
|
|
||||||
u2c = prev.callPackage ./contrib/package/nix/u2c {
|
|
||||||
inherit copyparty;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
// flake-utils.lib.eachDefaultSystem (
|
// flake-utils.lib.eachDefaultSystem (
|
||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
inherit system;
|
appliedOverlay = self.overlays.default pkgs pkgs;
|
||||||
config = {
|
|
||||||
allowAliases = false;
|
|
||||||
};
|
|
||||||
overlays = [ self.overlays.default ];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# check that copyparty builds with all optionals turned on
|
# check that copyparty builds with all optionals turned on
|
||||||
|
@ -52,7 +35,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
inherit (pkgs)
|
inherit (appliedOverlay)
|
||||||
copyparty
|
copyparty
|
||||||
partyfuse
|
partyfuse
|
||||||
u2c
|
u2c
|
||||||
|
|
Loading…
Reference in a new issue