Compare commits
22 Commits
gitea-acti
...
3ef84a6b8c
Author | SHA1 | Date | |
---|---|---|---|
3ef84a6b8c
|
|||
5f20482f72
|
|||
f515a00748
|
|||
eb40cab148
|
|||
739324df92
|
|||
a840f3f3d6
|
|||
36897a543d
|
|||
161a4a3164
|
|||
6920f115fc
|
|||
c3ae074b0e
|
|||
17013e425e
|
|||
e5934da311
|
|||
4c8d7df432
|
|||
94a18eac26
|
|||
0b76292a1f
|
|||
747aae7774
|
|||
95d04865b6
|
|||
92401c5f6d
|
|||
3cd3ab43e4
|
|||
02172cd3cf
|
|||
388891aa55
|
|||
a6c7ddbb34
|
@@ -16,9 +16,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: https://gitea.com/actions/checkout@v3
|
||||
- name: Install nix
|
||||
uses: https://github.com/cachix/install-nix-action@v23
|
||||
with:
|
||||
github_access_token: ${{ secrets.INPUT_GITHUB_ACCESS_TOKEN }}
|
||||
uses: https://github.com/cachix/install-nix-action@v24
|
||||
- name: Check ${{ matrix.check }}
|
||||
# Depends on nixos/nix#7759 to simply `nix flake check`
|
||||
run: nix run .#checks.$(nix eval --raw --impure --expr "builtins.currentSystem").${{ matrix.check }}
|
||||
@@ -48,7 +46,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: https://gitea.com/actions/checkout@v3
|
||||
- name: Install nix
|
||||
uses: https://github.com/cachix/install-nix-action@v23
|
||||
uses: https://github.com/cachix/install-nix-action@v24
|
||||
- name: Show nixpkgs version
|
||||
run: nix eval --impure --expr '(import ./flake-compat.nix { src = ./.; }).lib.version'
|
||||
- name: Setup cachix
|
||||
|
28
.travis.yml
28
.travis.yml
@@ -1,28 +0,0 @@
|
||||
version: ~> 1.0
|
||||
import: nix-community/nix-travis-ci:nix.yml@main
|
||||
|
||||
dist: xenial
|
||||
os: linux
|
||||
|
||||
env:
|
||||
global:
|
||||
- CACHIX_CACHE="xeals"
|
||||
- NUR_REPO="xeals"
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- env: NIX_PATH=nixpkgs=channel:nixpkgs-unstable
|
||||
- env: NIX_PATH=nixpkgs=channel:nixos-unstable
|
||||
# - env: NIX_PATH=nixpkgs=channel:nixos-20.03
|
||||
|
||||
script:
|
||||
- nix-build ci.nix -kA buildOutputs
|
||||
- nix eval -f default.nix 'lib'
|
||||
- nix eval -f default.nix 'modules'
|
||||
- nix eval -f default.nix 'overlays'
|
||||
|
||||
after_success:
|
||||
- if [ -n "${CACHIX_CACHE}" ]; then nix-build ci.nix -kA cacheOutputs | cachix push "${CACHIX_CACHE}"; fi
|
||||
- if [[ NUR_REPO != "xeals" && "cron" != "${TRAVIS_EVENT_TYPE}" && "false" = "${TRAVIS_PULL_REQUEST}" && "master" = "${TRAVIS_BRANCH}" ]]; then
|
||||
curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi
|
||||
|
52
README.md
52
README.md
@@ -2,44 +2,26 @@
|
||||
|
||||
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
||||
|
||||
[](https://github.com/xeals/nur-packages/actions) [](https://xeals.cachix.org)
|
||||
[CI](https://git.xeals.me/xeals/nur-packages/actions) [](https://xeals.cachix.org)
|
||||
|
||||
## Noteworthy packages
|
||||
## Using
|
||||
|
||||
### Jetbrains with plugins
|
||||
|
||||
A fan of the Emacs/Vim/VSCode plugin builder? Now enjoy it with your favourite Jetbrains IDE!
|
||||
|
||||
The system is mostly proof-of-concept and there are a couple of issues with it at the moment, but it works for what is available in the repo.
|
||||
|
||||
#### Using
|
||||
Using packages is easier through the combined [NUR](https://github.com/nix-community/NUR) flake.
|
||||
|
||||
```nix
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
xeals = import (builtins.fetchTarball "https://git.xeal.me/xeals/nur-packages/archive/master.tar.gz") {
|
||||
inherit pkgs;
|
||||
# flake.nix
|
||||
{
|
||||
inputs = {
|
||||
xeals.url = "git+https://git.xeal.me/xeals/nur-packages"; # Direct
|
||||
xeals.url = "github:xeals/nur-packages"; # GitHub mirror
|
||||
};
|
||||
in
|
||||
# e.g., for IntelliJ IDEA
|
||||
xeals.jetbrains.ideaCommunityWithPlugins (jpkgs: [
|
||||
jpkgs.ideavim
|
||||
jpkgs.checkstyle-idea
|
||||
])
|
||||
|
||||
outputs = { nixpkgs, xeals, ... }: {
|
||||
nixosConfigurations.foo = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
xeals.nixosModules.betanin
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
#### Issues
|
||||
|
||||
- [ ] The plugin derivation overrides the base instead of extending it; this is really only an issue for the open-source IDEs, and only once they're actually built from source (instead of repackaging the JARs)
|
||||
- [ ] Plugins must be manually added to the repo; long-term, I'd really want some way to scrape them, or at least have a script to add and update
|
||||
|
||||
### spotify-ripper
|
||||
|
||||
`spotify-ripper` is pretty flexible in the formats it supports, so the derivation allows you to customize which support packages to build with.
|
||||
|
||||
The default package comes with nothing (which is not entirely useful -- this will probably change at some point). See [the builder](./pkgs/tools/misc/spotify-ripper/default.nix) for options.
|
||||
|
||||
## General issues
|
||||
|
||||
- [ ] `spotify-ripper` does not build on stable NixOS channels before 20.09 when built with m4a or mp4 support, as `fdk-aac-encoder` is not available
|
||||
- [ ] Due to changes in toolchains affected fixed output hashes, anything using `buildGoModule` and `buildRustPackage` will fail on NixOS 20.03. Override the hashes of `vendor` and `cargoDeps` attributes as needed
|
||||
|
12
flake.lock
generated
12
flake.lock
generated
@@ -5,11 +5,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1699725108,
|
||||
"narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=",
|
||||
"lastModified": 1719931832,
|
||||
"narHash": "sha256-0LD+KePCKKEb4CcPsTBOwf019wDtZJanjoKm1S8q3Do=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e",
|
||||
"rev": "0aeab749216e4c073cece5d34bc01b79e717c3e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
28
flake.nix
28
flake.nix
@@ -5,10 +5,6 @@
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
inherit (flake-utils.lib) mkApp;
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
@@ -17,14 +13,12 @@
|
||||
{
|
||||
packages = import ./pkgs/top-level { localSystem = system; inherit pkgs; };
|
||||
|
||||
formatter = pkgs.writeShellScriptBin "nur-packages-fmt" ''
|
||||
${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt .
|
||||
${pkgs.deadnix}/bin/deadnix -e .
|
||||
'';
|
||||
|
||||
checks = {
|
||||
# FIXME: Disabled until I can work out what to do with generated code.
|
||||
# nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
|
||||
# ${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt --check .
|
||||
# '';
|
||||
# deadnix = pkgs.writeShellScriptBin "deadnix-check" ''
|
||||
# ${pkgs.deadnix}/bin/deadnix --fail .
|
||||
# '';
|
||||
# Ensures that the NUR bot can evaluate and find all our packages.
|
||||
# Normally we'd also run with `--option restrict-eval true`, but
|
||||
# this is incompatible with flakes because reasons.
|
||||
@@ -47,19 +41,11 @@
|
||||
devShells.ci = pkgs.mkShellNoCC {
|
||||
buildInputs = [ pkgs.nix-build-uncached ];
|
||||
};
|
||||
|
||||
apps = {
|
||||
alacritty = mkApp { drv = pkgs.alacritty-ligatures; exePath = "/bin/alacritty"; };
|
||||
psst-cli = mkApp { drv = pkgs.psst; exePath = "/bin/psst-cli"; };
|
||||
psst-gui = mkApp { drv = pkgs.psst; exePath = "/bin/psst-gui"; };
|
||||
samrewritten = mkApp { drv = pkgs.samrewritten; };
|
||||
spotify-ripper = mkApp { drv = pkgs.spotify-ripper; };
|
||||
};
|
||||
})
|
||||
// {
|
||||
nixosModules = lib.mapAttrs (_: path: import path) (import ./modules) // {
|
||||
nixosModules = nixpkgs.lib.mapAttrs (_: path: import path) (import ./modules) // {
|
||||
default = {
|
||||
imports = lib.attrValues self.nixosModules;
|
||||
imports = nixpkgs.lib.attrValues self.nixosModules;
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
amdgpu-pwm = ./services/hardware/amdgpu-pwm.nix;
|
||||
betanin = ./services/web-apps/betanin.nix;
|
||||
dunst = ./services/x11/dunst.nix;
|
||||
koillection = ./services/web-apps/koillection.nix;
|
||||
porkbun-ddns = ./services/networking/porkbun-ddns.nix;
|
||||
radeon-profile-daemon = ./services/hardware/radeon-profile-daemon.nix;
|
||||
}
|
||||
|
318
modules/services/web-apps/koillection.nix
Normal file
318
modules/services/web-apps/koillection.nix
Normal file
@@ -0,0 +1,318 @@
|
||||
{ config, lib, modulesPath, options, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) literalExpression mkEnableOption mkIf mkOption optionalString types;
|
||||
|
||||
opt = options.services.koillection;
|
||||
cfg = config.services.koillection;
|
||||
db = cfg.database;
|
||||
|
||||
koillection = (pkgs.koillection or pkgs.callPackage ../../../pkgs/by-name/ko/koillection/package.nix { }).override {
|
||||
dataDir = cfg.dataDir;
|
||||
};
|
||||
inherit (koillection.passthru) phpPackage;
|
||||
in
|
||||
{
|
||||
options.services.koillection = {
|
||||
enable = mkEnableOption "Koillection, a collection manager";
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "koillection";
|
||||
description = lib.mdDoc "User Koillection runs as.";
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "koillection";
|
||||
description = lib.mdDoc "Group Koillection runs as.";
|
||||
};
|
||||
|
||||
hostName = lib.mkOption {
|
||||
type = types.str;
|
||||
default = config.networking.fqdnOrHostName;
|
||||
defaultText = "config.networking.fqdnOrHostName";
|
||||
example = "koillection.example.com";
|
||||
description = lib.mdDoc "The hostname to serve Koillection on.";
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
description = lib.mdDoc "Koillection data directory";
|
||||
default = "/var/lib/koillection";
|
||||
type = types.path;
|
||||
};
|
||||
|
||||
database = {
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = if db.createLocally then "/run/postgresql" else null;
|
||||
defaultText = literalExpression ''
|
||||
if config.${opt.database.createLocally}
|
||||
then "/run/postgresql"
|
||||
else null
|
||||
'';
|
||||
example = "192.168.12.85";
|
||||
description = lib.mdDoc "Database host address or unix socket.";
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 5432;
|
||||
description = lib.mdDoc "Database host port.";
|
||||
};
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "koillection";
|
||||
description = lib.mdDoc "Database name.";
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = cfg.user;
|
||||
defaultText = literalExpression "user";
|
||||
description = lib.mdDoc "Database username.";
|
||||
};
|
||||
passwordFile = mkOption {
|
||||
type = with types; nullOr path;
|
||||
default = null;
|
||||
example = "/run/keys/koillection-dbpassword";
|
||||
description = lib.mdDoc ''
|
||||
A file containing the password corresponding to
|
||||
{option}`database.user`.
|
||||
'';
|
||||
};
|
||||
createLocally = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc "Create the database and database user locally.";
|
||||
};
|
||||
};
|
||||
|
||||
poolConfig = mkOption {
|
||||
type = with types; attrsOf (oneOf [ str int bool ]);
|
||||
default = {
|
||||
"pm" = "dynamic";
|
||||
"pm.max_children" = 32;
|
||||
"pm.start_servers" = 2;
|
||||
"pm.min_spare_servers" = 2;
|
||||
"pm.max_spare_servers" = 4;
|
||||
"pm.max_requests" = 500;
|
||||
};
|
||||
description = lib.mdDoc ''
|
||||
Options for the bookstack PHP pool. See the documentation on `php-fpm.conf`
|
||||
for details on configuration directives.
|
||||
'';
|
||||
};
|
||||
|
||||
nginx = mkOption {
|
||||
type = types.submodule (
|
||||
lib.recursiveUpdate
|
||||
(import "${modulesPath}/services/web-servers/nginx/vhost-options.nix" { inherit config lib; })
|
||||
{ }
|
||||
);
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
serverAliases = [
|
||||
"koillection.''${config.networking.domain}"
|
||||
];
|
||||
# To enable encryption and let let's encrypt take care of certificate
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
}
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
With this option, you can customize the nginx virtualHost settings.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = with types;
|
||||
attrsOf
|
||||
(nullOr
|
||||
(either
|
||||
(oneOf [ bool int port path str ])
|
||||
(submodule {
|
||||
options = {
|
||||
_secret = mkOption {
|
||||
type = nullOr str;
|
||||
description = lib.mdDoc ''
|
||||
The path to a file containing the value the option should
|
||||
be set to in the final configuration file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
})));
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.koillection.config = {
|
||||
APP_ENV = "prod";
|
||||
# DB_DRIVER = "pdo_pgsql";
|
||||
DB_USER = db.user;
|
||||
DB_PASSWORD._secret = db.passwordFile;
|
||||
DB_HOST = db.host;
|
||||
DB_PORT = db.port;
|
||||
DB_NAME = db.name;
|
||||
# FIXME
|
||||
# DB_VERSION = lib.versions.major config.services.postgresql.package.version;
|
||||
DB_VERSION = "15";
|
||||
PHP_TZ = config.time.timeZone;
|
||||
};
|
||||
|
||||
services.postgresql = mkIf db.createLocally {
|
||||
enable = true;
|
||||
ensureDatabases = [ db.name ];
|
||||
ensureUsers = [{
|
||||
name = db.user;
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
|
||||
services.phpfpm.pools.koillection = {
|
||||
inherit (cfg) user group;
|
||||
inherit phpPackage;
|
||||
# Copied from docker/php.ini
|
||||
phpOptions = ''
|
||||
max_execution_time = 200
|
||||
|
||||
apc.enabled = 1
|
||||
apc.shm_size = 64M
|
||||
apc.ttl = 7200
|
||||
|
||||
opcache.enable = 1
|
||||
opcache.memory_consumption = 256
|
||||
opcache.max_accelerated_files = 20000
|
||||
opcache.max_wasted_percentage = 10
|
||||
opcache.validate_timestamps = 0
|
||||
opcache.preload = ${koillection}/share/php/koillection/config/preload.php
|
||||
opcache.preload_user = ${cfg.user}
|
||||
expose_php = Off
|
||||
|
||||
session.cookie_httponly = 1
|
||||
realpath_cache_size = 4096K
|
||||
realpath_cache_ttle = 600
|
||||
'';
|
||||
settings = {
|
||||
"listen.mode" = "0660";
|
||||
"listen.owner" = cfg.user;
|
||||
"listen.group" = cfg.group;
|
||||
} // cfg.poolConfig;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = lib.mkDefault true;
|
||||
virtualHosts."${cfg.hostName}" = lib.mkMerge [
|
||||
cfg.nginx
|
||||
{
|
||||
root = lib.mkForce "${koillection}/share/php/koillection/public";
|
||||
extraConfig = optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;";
|
||||
locations = {
|
||||
"/" = {
|
||||
index = "index.php";
|
||||
extraConfig = ''try_files $uri $uri/ /index.php?query_string;'';
|
||||
};
|
||||
"~ \.php$" = {
|
||||
extraConfig = ''
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
include ${config.services.nginx.package}/conf/fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools."koillection".socket};
|
||||
${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;"}
|
||||
'';
|
||||
};
|
||||
"~ \.(js|css|gif|png|ico|jpg|jpeg)$" = {
|
||||
extraConfig = "expires 365d;";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.koillection-setup = {
|
||||
description = "Preparation tasks for koillection";
|
||||
before = [ "phpfpm-koillection.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
User = cfg.user;
|
||||
WorkingDirectory = koillection;
|
||||
RuntimeDirectory = "koillection/cache";
|
||||
RuntimeDirectoryMode = "0700";
|
||||
};
|
||||
path = [ pkgs.replace-secret ];
|
||||
script =
|
||||
let
|
||||
isSecret = v: lib.isAttrs v && v ? _secret && lib.isString v._secret;
|
||||
koillectionEnvVars = lib.generators.toKeyValue {
|
||||
mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" {
|
||||
mkValueString = v: with builtins;
|
||||
if isInt v then toString v
|
||||
else if lib.isString v then v
|
||||
else if true == v then "true"
|
||||
else if false == v then "false"
|
||||
else if isSecret v then hashString "sha256" v._secret
|
||||
else throw "unsupported type ${typeOf v}: ${(lib.generators.toPretty {}) v}";
|
||||
};
|
||||
};
|
||||
secretPaths = lib.mapAttrsToList (_: v: v._secret) (lib.filterAttrs (_: isSecret) cfg.config);
|
||||
mkSecretReplacement = file: ''
|
||||
replace-secret ${lib.escapeShellArgs [ ( builtins.hashString "sha256" file ) file "${cfg.dataDir}/.env" ]}
|
||||
'';
|
||||
secretReplacements = lib.concatMapStrings mkSecretReplacement secretPaths;
|
||||
filteredConfig = lib.converge (lib.filterAttrsRecursive (_: v: ! builtins.elem v [{ } null])) cfg.config;
|
||||
koillectionEnv = pkgs.writeText "koillection.env" (koillectionEnvVars filteredConfig);
|
||||
in
|
||||
''
|
||||
# error handling
|
||||
set -euo pipefail
|
||||
|
||||
# set permissions
|
||||
umask 077
|
||||
|
||||
# create .env file
|
||||
install -T -m 0600 -o ${cfg.user} ${koillectionEnv} "${cfg.dataDir}/.env"
|
||||
${secretReplacements}
|
||||
|
||||
# prepend `base64:` if it does not exist in APP_KEY
|
||||
|
||||
if ! grep 'APP_KEY=base64:' "${cfg.dataDir}/.env" >/dev/null; then
|
||||
sed -i 's/APP_KEY=/APP_KEY=base64:/' "${cfg.dataDir}/.env"
|
||||
fi
|
||||
|
||||
# migrate db
|
||||
${lib.getExe phpPackage} ${koillection}/share/php/koillection/bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
|
||||
|
||||
# dump translations
|
||||
# TODO: Might need pointing somewhere else.
|
||||
${lib.getExe phpPackage} ${koillection}/share/php/koillection/bin/console app:translations:dump
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${cfg.dataDir} 0710 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.dataDir}/public 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.dataDir}/public/uploads 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.dataDir}/var 0700 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.dataDir}/var/cache 0700 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.dataDir}/var/cache/prod 0700 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.dataDir}/var/logs 0700 ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
|
||||
users = {
|
||||
users = mkIf (cfg.user == "koillection") {
|
||||
koillection = {
|
||||
inherit (cfg) group;
|
||||
isSystemUser = true;
|
||||
};
|
||||
"${config.services.nginx.user}".extraGroups = [ cfg.group ];
|
||||
};
|
||||
groups = mkIf (cfg.group == "koillection") {
|
||||
koillection = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, jdk17
|
||||
, udev
|
||||
, xorg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "atlauncher";
|
||||
version = "3.4.35.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${version}/ATLauncher-${version}.jar";
|
||||
hash = "sha256-CVJQGMnETW9BOn2To09/UuLrseNfovUyEFhcz/zyHOQ=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/java
|
||||
cp $src $out/share/java/ATLauncher.jar
|
||||
makeWrapper ${jdk17}/bin/java $out/bin/atlauncher \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm udev ]}" \
|
||||
--add-flags "-jar $out/share/java/ATLauncher.jar" \
|
||||
--add-flags "--working-dir \''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher" \
|
||||
--add-flags "--no-launcher-update"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Minecraft launcher";
|
||||
longDescription = ''
|
||||
ATLauncher is a Launcher for Minecraft which integrates multiple different
|
||||
ModPacks to allow you to download and install ModPacks easily and quickly.
|
||||
'';
|
||||
sourceProvenance = [
|
||||
(lib.sourceTypes.binaryBytecode or { shortName = "binaryBytecode"; isSource = false; })
|
||||
];
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.all;
|
||||
homepage = "https://atlauncher.com/";
|
||||
};
|
||||
}
|
@@ -1,71 +1,73 @@
|
||||
{ lib
|
||||
, callPackage
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, beets
|
||||
}:
|
||||
|
||||
let
|
||||
py = python3.pkgs;
|
||||
|
||||
version = "0.4.0.ffe45c02";
|
||||
version = "0.5.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xeals";
|
||||
owner = "sentriz";
|
||||
repo = "betanin";
|
||||
rev = "ffe45c028037fc1659f62a9cdc9e1413dc2f358d";
|
||||
hash = "sha256-5d8Y7PDlhkdVRVX+KvpiQ2WYNRELwc+ya5s4Qi+YQpI=";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-8JzZfxXzey6vGwsnpXTea/gTMFwmeeavimn5njHIEg0=";
|
||||
};
|
||||
|
||||
client = callPackage ./client {
|
||||
inherit src version;
|
||||
client = buildNpmPackage {
|
||||
pname = "betanin_client";
|
||||
inherit version src;
|
||||
|
||||
sourceRoot = "${src.name}/betanin_client";
|
||||
|
||||
npmDepsHash = "sha256-VkCQKpkDCTDejv8eRAN2Zfbq8TlWLdtqVJU3fo9hQrI=";
|
||||
NODE_OPTIONS = "--openssl-legacy-provider";
|
||||
};
|
||||
in
|
||||
py.buildPythonApplication {
|
||||
python3.pkgs.buildPythonApplication {
|
||||
pname = "betanin";
|
||||
inherit version src;
|
||||
|
||||
clientDistDir = "${client}/lib/node_modules/betanin/dist/";
|
||||
|
||||
doCheck = false;
|
||||
format = "pyproject";
|
||||
|
||||
patches = [ ./paths.patch ];
|
||||
postPatch = ''
|
||||
export clientDistDir="${client}/lib/node_modules/betanin/dist/"
|
||||
export libPrefix="${python3.libPrefix}"
|
||||
substituteAllInPlace betanin/paths.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs =
|
||||
(builtins.attrValues {
|
||||
inherit (py)
|
||||
apprise
|
||||
alembic
|
||||
click
|
||||
flask
|
||||
flask-cors
|
||||
flask-jwt-extended
|
||||
flask_migrate
|
||||
flask-restx
|
||||
flask-socketio
|
||||
flask-sqlalchemy
|
||||
gevent
|
||||
pyxdg
|
||||
loguru
|
||||
ptyprocess
|
||||
python-engineio
|
||||
python-socketio
|
||||
sqlalchemy
|
||||
sqlalchemy-utils
|
||||
toml;
|
||||
}) ++ [
|
||||
beets
|
||||
];
|
||||
buildInputs = with python3.pkgs; [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = (with python3.pkgs; [
|
||||
apprise
|
||||
alembic
|
||||
click
|
||||
flask
|
||||
flask-cors
|
||||
flask-jwt-extended
|
||||
flask_migrate
|
||||
flask-restx
|
||||
flask-socketio
|
||||
flask-sqlalchemy
|
||||
gevent
|
||||
pyxdg
|
||||
loguru
|
||||
ptyprocess
|
||||
python-engineio
|
||||
python-socketio
|
||||
sqlalchemy
|
||||
sqlalchemy-utils
|
||||
toml
|
||||
]) ++ [
|
||||
beets
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/sentriz/betanin";
|
||||
description = "beets based mitm of your torrent client and music player";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = [ ];
|
||||
platforms = python3.meta.platforms;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@@ -1,62 +0,0 @@
|
||||
diff --git a/cardboard/meson.build b/cardboard/meson.build
|
||||
index b236f71..a90f230 100644
|
||||
--- a/cardboard/meson.build
|
||||
+++ b/cardboard/meson.build
|
||||
@@ -4,24 +4,15 @@ xkbcommon = dependency('xkbcommon')
|
||||
xcb = dependency('xcb', required: get_option('xwayland'))
|
||||
|
||||
wlroots_version = '>=0.10.0'
|
||||
-wlroots_proj = subproject(
|
||||
+wlroots = dependency(
|
||||
'wlroots',
|
||||
- default_options: ['examples=false'],
|
||||
required: true,
|
||||
version: wlroots_version,
|
||||
)
|
||||
|
||||
-wlroots = wlroots_proj.get_variable('wlroots')
|
||||
-wlroots_conf = wlroots_proj.get_variable('conf_data')
|
||||
-wlroots_has_xwayland = wlroots_conf.get('WLR_HAS_XWAYLAND') == 1
|
||||
+have_xwayland = xcb.found()
|
||||
|
||||
-if get_option('xwayland').enabled() and not wlroots_has_xwayland
|
||||
- error('Cannot enable Xwayland support in cardboard: wlroots has been built without Xwayland support')
|
||||
-endif
|
||||
-have_xwayland = xcb.found() and wlroots_has_xwayland
|
||||
-
|
||||
-expected_proj = subproject('expected', required: true)
|
||||
-expected = expected_proj.get_variable('expected_dep')
|
||||
+expected = dependency('tl-expected', required: true, method: 'cmake', modules: ['tl::expected'])
|
||||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set10('HAVE_XWAYLAND', have_xwayland)
|
||||
diff --git a/cutter/meson.build b/cutter/meson.build
|
||||
index f1260a4..1485f37 100644
|
||||
--- a/cutter/meson.build
|
||||
+++ b/cutter/meson.build
|
||||
@@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
-expected_proj = subproject('expected', required: true)
|
||||
-expected = expected_proj.get_variable('expected_dep')
|
||||
+expected = dependency('tl-expected', required: true, method: 'cmake', modules: ['tl::expected'])
|
||||
|
||||
executable(
|
||||
'cutter',
|
||||
diff --git a/libcardboard/meson.build b/libcardboard/meson.build
|
||||
index 89698fe..3ac8115 100644
|
||||
--- a/libcardboard/meson.build
|
||||
+++ b/libcardboard/meson.build
|
||||
@@ -1,11 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
libcardboard_inc = include_directories('include')
|
||||
|
||||
-expected_proj = subproject('expected', required: true)
|
||||
-expected = expected_proj.get_variable('expected_dep')
|
||||
+expected = dependency('tl-expected', required: true, method: 'cmake', modules: ['tl::expected'])
|
||||
|
||||
-cereal_proj = subproject('cereal', required: true)
|
||||
-cereal = cereal_proj.get_variable('cereal_dep')
|
||||
+cereal = dependency('cereal', required: true, method: 'cmake')
|
||||
|
||||
sources = files(
|
||||
'src/command_protocol.cpp',
|
@@ -1,68 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, cereal
|
||||
, cmake
|
||||
, libGL
|
||||
, libX11
|
||||
, libinput
|
||||
, libxkbcommon
|
||||
, meson
|
||||
, ninja
|
||||
, pixman
|
||||
, pkg-config
|
||||
, tl-expected
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, wlroots
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cardboard";
|
||||
version = "20210120.g7b15613";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "cardboardwm";
|
||||
repo = "cardboard";
|
||||
rev = "7b15613e6e1222a6a83d69a2e5da2810dfb45522";
|
||||
sha256 = "044sb0lv1gcywpdncvlv7npxvbsqcc1mwpk0f6i73dinchdz7gmq";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-use-system-dependencies.patch
|
||||
];
|
||||
|
||||
# CMake likes to own the configurePhase, but we only need it for dependency
|
||||
# discovery. Remove it.
|
||||
configurePhase = "mesonConfigurePhase";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cereal
|
||||
libGL
|
||||
libX11
|
||||
libinput
|
||||
libxkbcommon
|
||||
pixman
|
||||
tl-expected
|
||||
wayland
|
||||
wayland-protocols
|
||||
wlroots
|
||||
];
|
||||
|
||||
passthru.providedSessions = [ "cardboard" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Scrollable tiling Wayland compositor designed with laptops in mind";
|
||||
homepage = "https://gitlab.com/cardboardwm/cardboard";
|
||||
license = licenses.gpl3;
|
||||
platforms = wlroots.meta.platforms;
|
||||
broken = true;
|
||||
};
|
||||
}
|
@@ -9,14 +9,14 @@
|
||||
|
||||
let
|
||||
pname = "cura5";
|
||||
version = "5.5.0";
|
||||
version = "5.6.0";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
cura5 = appimageTools.wrapType2 {
|
||||
inherit pname version;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/Ultimaker-Cura-${version}-linux-X64.AppImage";
|
||||
hash = "sha256-EG5LMiDFUSXFbtRhd15egPkbp12kEp2TdUdLssSy7Jg=";
|
||||
hash = "sha256-EHiWoNpLKHPzv6rZrtNgEr7y//iVcRYeV/TaCn8QpEA=";
|
||||
};
|
||||
extraPkgs = _: [ ];
|
||||
};
|
||||
|
35
pkgs/by-name/ge/gersemi/package.nix
Normal file
35
pkgs/by-name/ge/gersemi/package.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ lib
|
||||
, python3
|
||||
, fetchPypi
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "gersemi";
|
||||
version = "0.11.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-K8ZbVVYiEazdjbuAUa8r9lJyjOPt2jsKbUAovTx9XeY=";
|
||||
};
|
||||
|
||||
# Remove dataclasses backport requirement since it doesn't work on newer
|
||||
# Python.
|
||||
patchPhase = ''
|
||||
sed -i '/dataclasses/d' setup.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
appdirs
|
||||
colorama
|
||||
lark
|
||||
pyyaml
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A formatter to make your CMake code the real treasure";
|
||||
homepage = "https://github.com/BlankSpruce/gersemi";
|
||||
license = lib.licenses.mpl20;
|
||||
platforms = python3.meta.platforms;
|
||||
};
|
||||
}
|
25
pkgs/by-name/ko/koillection/koillection-dirs.patch
Normal file
25
pkgs/by-name/ko/koillection/koillection-dirs.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
*** a/src/Kernel.php
|
||||
--- b/src/Kernel.php
|
||||
@@ -8,6 +8,21 @@ class Kernel extends BaseKernel
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
|
||||
class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
+
|
||||
+ public function getDataDir(): string
|
||||
+ {
|
||||
+ return '@dataDir@';
|
||||
+ }
|
||||
+
|
||||
+ public function getCacheDir(): string
|
||||
+ {
|
||||
+ return $this->getDataDir() . '/var/cache/' . $this->getEnvironment();
|
||||
+ }
|
||||
+
|
||||
+ public function getLogDir(): string
|
||||
+ {
|
||||
+ return $this->getDataDir() . '/var/logs';
|
||||
+ }
|
||||
}
|
||||
|
69
pkgs/by-name/ko/koillection/package.nix
Normal file
69
pkgs/by-name/ko/koillection/package.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{ lib
|
||||
, dataDir ? "/var/lib/koillection"
|
||||
# REVIEW: This supposed to be aliased by the caller, which means it shouldn't
|
||||
# go in by-name, I think.
|
||||
, php83
|
||||
, fetchFromGitHub
|
||||
, mkYarnPackage
|
||||
, fetchYarnDeps
|
||||
}:
|
||||
|
||||
php83.buildComposerProject (finalAttrs: {
|
||||
pname = "koillection";
|
||||
version = "1.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "benjaminjonard";
|
||||
repo = "koillection";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-r2rkHhp0F5QfwJuKeu4UdPoluDXxpyhYpie1zUk1h5c=";
|
||||
};
|
||||
|
||||
frontend = mkYarnPackage {
|
||||
inherit (finalAttrs) pname version;
|
||||
|
||||
src = "${finalAttrs.src}/assets";
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${finalAttrs.src}/assets/yarn.lock";
|
||||
hash = "";
|
||||
};
|
||||
};
|
||||
|
||||
patches = [
|
||||
./koillection-dirs.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/Kernel.php \
|
||||
--replace "@dataDir@" "${dataDir}"
|
||||
'';
|
||||
|
||||
# Lock file uses exact constraints, which Composer doesn't like.
|
||||
composerStrictValidation = false;
|
||||
# Actually installs plugins, i.e., Symfony.
|
||||
composerNoPlugins = false;
|
||||
vendorHash = "sha256-LU9ZN4qUNUpSBGH6AChw3qU4RjgsoPJmLL01FS7UKRQ=";
|
||||
|
||||
postInstall = ''
|
||||
local koillection_out=$out/share/php/koillection
|
||||
|
||||
rm -R $koillection_out/public/uploads
|
||||
ln -s ${dataDir}/.env $koillection_out/.env.local
|
||||
ln -s ${dataDir}/public/uploads $koillection_out/public/uploads
|
||||
|
||||
cp -r ${finalAttrs.frontend} assets/
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
phpPackage = php83;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Self-hosted service allowing users to manage any kind of collections";
|
||||
homepage = "https://github.com/benjaminjonard/koillection";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
broken = true; # Blocked on NixOS/nixpkgs#254369
|
||||
};
|
||||
})
|
@@ -1,48 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, curl
|
||||
, gnumake
|
||||
, gnutls
|
||||
, gtk3
|
||||
, gtkmm3
|
||||
, pkg-config
|
||||
, yajl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "SamRewritten";
|
||||
version = "2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PaulCombal";
|
||||
repo = pname;
|
||||
rev = "202008";
|
||||
sha256 = "ab7903b997675b0d4d7eede15430fc5ca2736e6c25c7f95a7c97e1ce25582a1c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gnumake pkg-config ];
|
||||
buildInputs = [
|
||||
curl
|
||||
gnutls
|
||||
gtk3
|
||||
gtkmm3
|
||||
yajl
|
||||
];
|
||||
|
||||
NIX_CFLAGS_LINK = "-pthread";
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/share/applications/samrewritten.desktop \
|
||||
--replace /usr/bin/samrewritten $out/bin/samrewritten
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Steam Achievement Manager For Linux";
|
||||
homepage = "https://github.com/PaulCombal/SamRewritten";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
16
pkgs/by-name/th/thor/nugetDeps.nix
Normal file
16
pkgs/by-name/th/thor/nugetDeps.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
# This file was automatically generated by passthru.fetch-deps.
|
||||
# Please dont edit it manually, your changes might get overwritten!
|
||||
|
||||
{ fetchNuGet }: [
|
||||
(fetchNuGet { pname = "K4os.Compression.LZ4"; version = "1.3.5"; sha256 = "1nv9inhz0n25lhkw9xgp6g5xbqmcdccdhx6mwrli0pdp6hjmlh9k"; })
|
||||
(fetchNuGet { pname = "K4os.Compression.LZ4.Streams"; version = "1.3.5"; sha256 = "09m0jxq6558r1v1l4rsc8c0n6nlacz2d8c03as6kvvvz2gr7h506"; })
|
||||
(fetchNuGet { pname = "K4os.Hash.xxHash"; version = "1.0.8"; sha256 = "0vz1f81z4rh7a576fdzbc6wmj7p4gaca1rch3anvh1s5qd7xdd10"; })
|
||||
(fetchNuGet { pname = "Serilog"; version = "3.0.0-dev-02022"; sha256 = "0c7gqhzkcdzmhycq60mzwqwcycl99ksk4q0pmwz140japasfhcqk"; })
|
||||
(fetchNuGet { pname = "Serilog.Exceptions"; version = "8.4.0"; sha256 = "1v0rnhr616wj85gb6wvafj22kvnphp7m9vsyalcc25hwa1jvlryr"; })
|
||||
(fetchNuGet { pname = "Serilog.Sinks.Console"; version = "4.1.1-dev-00910"; sha256 = "00h3sd0lxnx53jmgqh84pw73zk3d710dvlgkf4x135vfhax9bw7m"; })
|
||||
(fetchNuGet { pname = "SharpCompress"; version = "0.33.0"; sha256 = "1j94hfjvkygpp97svv75jay0rmnx9ygg86d5syyahl9hayns4ig9"; })
|
||||
(fetchNuGet { pname = "Spectre.Console"; version = "0.47.1-preview.0.8"; sha256 = "1r6v16lh7mqxxh3j9lqryif8skx3q9nkgf5gnp5xpc4im3a52wql"; })
|
||||
(fetchNuGet { pname = "System.IO.Pipelines"; version = "6.0.3"; sha256 = "1jgdazpmwc21dd9naq3l9n5s8a1jnbwlvgkf1pnm0aji6jd4xqdz"; })
|
||||
(fetchNuGet { pname = "System.Memory"; version = "4.5.5"; sha256 = "08jsfwimcarfzrhlyvjjid61j02irx6xsklf32rv57x2aaikvx0h"; })
|
||||
(fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.7.0"; sha256 = "04qw9km34pmzr2alckb3mqdb4fpqwlvzk59lg8c7jfidghcl4jqq"; })
|
||||
]
|
32
pkgs/by-name/th/thor/package.nix
Normal file
32
pkgs/by-name/th/thor/package.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildDotnetModule
|
||||
, dotnetCorePackages
|
||||
}:
|
||||
|
||||
buildDotnetModule rec {
|
||||
pname = "thor";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Samsung-Loki";
|
||||
repo = "Thor";
|
||||
rev = version;
|
||||
hash = "sha256-tYzPpgbM9rCDdLW0ERZWmmxzMYpe1BNyFwmpaLQXRGQ=";
|
||||
};
|
||||
|
||||
dotnet-sdk = dotnetCorePackages.sdk_7_0;
|
||||
dotnet-runtime = dotnetCorePackages.runtime_7_0;
|
||||
nugetDeps = ./nugetDeps.nix;
|
||||
projectFile = "TheAirBlow.Thor.Shell/TheAirBlow.Thor.Shell.csproj";
|
||||
|
||||
postFixup = ''
|
||||
mv $out/bin/TheAirBlow.Thor.Shell $out/bin/thor
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/Samsung-Loki/Thor";
|
||||
description = "An alternative to Heimdall";
|
||||
license = lib.licenses.mpl20;
|
||||
};
|
||||
}
|
27
pkgs/by-name/wg/wg2nd/package.nix
Normal file
27
pkgs/by-name/wg/wg2nd/package.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, libcap
|
||||
}: stdenv.mkDerivation {
|
||||
pname = "wg2nd";
|
||||
version = "20240605.23a3710";
|
||||
src = fetchFromGitHub {
|
||||
owner = "flu0r1ne";
|
||||
repo = "wg2nd";
|
||||
rev = "23a37100f121edd0c1291c4a78901662eae5d58b";
|
||||
hash = "sha256-XY19Vicg8l/2stlWj1QqJt0pJOi/kueQpBufVlLJVxk=";
|
||||
};
|
||||
|
||||
buildInputs = [ libcap ];
|
||||
|
||||
installPhase = ''
|
||||
PREFIX=$out BINDIR=/bin make install
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "WireGuard to systemd-networkd Configuration Converter";
|
||||
homepage = "https://git.flu0r1ine.net/wg2nd/about";
|
||||
license = [ lib.licenses.gpl2Only lib.licenses.mit ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
@@ -1,73 +0,0 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
let
|
||||
mkMonaspace =
|
||||
{ pname
|
||||
, variants ? [ ]
|
||||
}: stdenvNoCC.mkDerivation rec {
|
||||
inherit pname;
|
||||
version = "1.000";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "githubnext";
|
||||
repo = "monaspace";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Zo56r0QoLwxwGQtcWP5cDlasx000G9BFeGINvvwEpQs=";
|
||||
};
|
||||
|
||||
_variants = map (builtins.replaceStrings [ " " ] [ "" ]) variants;
|
||||
|
||||
installPhase = ''
|
||||
local out_font=$out/share/fonts/monaspace
|
||||
'' + (if variants == [ ] then ''
|
||||
install -m444 -Dt $out_font fonts/otf/*.otf
|
||||
install -m444 -Dt $out_font fonts/variable/*.ttf
|
||||
'' else ''
|
||||
for variant in $_variants; do
|
||||
install -m444 -Dt $out_font fonts/otf/"$variant"-*.otf
|
||||
install -m444 -Dt $out_font fonts/variable/"$variant"Var*.ttf
|
||||
done
|
||||
'');
|
||||
|
||||
meta = {
|
||||
description = "An innovative superfamily of fonts for code";
|
||||
homepage = "https://monaspace.githubnext.com/";
|
||||
longDescription = ''
|
||||
Since the earliest days of the teletype machine, code has been set in
|
||||
monospaced type — letters, on a grid. Monaspace is a new type system
|
||||
that advances the state of the art for the display of code on screen.
|
||||
'';
|
||||
license = lib.licenses.ofl;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
monaspace = mkMonaspace {
|
||||
pname = "monaspace";
|
||||
};
|
||||
|
||||
monaspace-argon = mkMonaspace {
|
||||
pname = "monaspace-argon";
|
||||
variants = [ "Monaspace Argon" ];
|
||||
};
|
||||
monaspace-krypton = mkMonaspace {
|
||||
pname = "monaspace-krypton";
|
||||
variants = [ "Monaspace Krypton" ];
|
||||
};
|
||||
monaspace-neon = mkMonaspace {
|
||||
pname = "monaspace-neon";
|
||||
variants = [ "Monaspace Neon" ];
|
||||
};
|
||||
monaspace-radon = mkMonaspace {
|
||||
pname = "monaspace-radon";
|
||||
variants = [ "Monaspace Radon" ];
|
||||
};
|
||||
monaspace-xenon = mkMonaspace {
|
||||
pname = "monaspace-xenon";
|
||||
variants = [ "Monaspace Xenon" ];
|
||||
};
|
||||
}
|
@@ -21,15 +21,6 @@ rec {
|
||||
ideaUltimateWithPlugins = ideaUltimatePlugins.jetbrainsWithPlugins;
|
||||
};
|
||||
|
||||
monaspace-fonts = pkgs.callPackage ../data/fonts/monaspace/default.nix { };
|
||||
inherit (monaspace-fonts)
|
||||
monaspace
|
||||
monaspace-argon
|
||||
monaspace-krypton
|
||||
monaspace-neon
|
||||
monaspace-radon
|
||||
monaspace-xenon;
|
||||
|
||||
mopidy-subidy = pkgs.callPackage ../applications/audio/mopidy/subidy.nix {
|
||||
python3Packages = pkgs.python3Packages // python3Packages;
|
||||
};
|
||||
|
Reference in New Issue
Block a user