Working config
This commit is contained in:
parent
c71b07a903
commit
e52b959613
|
@ -199,7 +199,7 @@ in {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://panopticon.sea.fudo.org/";
|
proxyPass = "http://cargo.sea.fudo.org:5000/webman/3rdparty/SurveillanceStation/";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
|
@ -101,7 +101,6 @@ in {
|
||||||
ucsFonts
|
ucsFonts
|
||||||
ultimate-oldschool-pc-font-pack
|
ultimate-oldschool-pc-font-pack
|
||||||
unifont
|
unifont
|
||||||
vistafonts
|
|
||||||
xlibs.fontadobe100dpi
|
xlibs.fontadobe100dpi
|
||||||
xlibs.fontadobe75dpi
|
xlibs.fontadobe75dpi
|
||||||
xlibs.fontadobeutopia100dpi
|
xlibs.fontadobeutopia100dpi
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
niten-home-generator = pkgs.callPackage ../niten-home-generator.nix {};
|
||||||
|
|
||||||
|
in {
|
||||||
config.fudo.users = {
|
config.fudo.users = {
|
||||||
niten = {
|
niten = {
|
||||||
uid = 10000;
|
uid = 10000;
|
||||||
|
@ -13,9 +16,10 @@
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDoWkjyeIfgwm0b78weToVYOQSD0RQ0qbNzpsN5NokbIFv2/980kLtnYrQEgIJ/JwMLlT3uJYacbCT5/a6Fb8oLxNpj0AF1EKaWZ3Rrlg72Sq+9SEwJwWWmZizX83sovMwUBMaUp6jWLhAhPpzBW5pfc5YWoc89wxGbELSwzgt5EgHbSJgvDnaHSp3fVaY01wfDXbL/oO160iNe7wv2HLMZu/FkWBkIjz6HmoGJJzYM89bUpHbyYG28lmCHB/8UPog5/BsjOn3/qupgf4zh6mMdMsXLvbR2jVwVjxcEMj9N5nCvc+Y3oi7Mij6VNrWbhkaAJMEzeMhWYrF3/pFQxUqG37aK3d0gw9kp5tMDLIlAPX4y1lfA87pIzoa0+Alql0CJQA1IJvp9SFG7lBmSthWQLmZvwwfoGg/ZjF6rOgsVoZ8TizpQnydWJDr6NboU9LL9Oa64OM5Rs0AU3cR2UbOF4QIcWFJ/7oDe3dOnfZ8QYqx9eXJyxoAUpDanaaTHYBiAKkeOBwQU+MVLKCcONKw9FZclf/1TpDB5b3/JeUFANjHQTv0UXA4YYU7iCx6H7XB4qwwtU9O19CGQYYfCfULX12/fRpYJw6VJaQWyyU4Bn5dk/dcB2nGI36jwbLMfhbUTIApujioAnd/GQIMakHEZ1+syPhMx9BxMkZb99B0A1Q== openpgp:0x4EC95B64"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDoWkjyeIfgwm0b78weToVYOQSD0RQ0qbNzpsN5NokbIFv2/980kLtnYrQEgIJ/JwMLlT3uJYacbCT5/a6Fb8oLxNpj0AF1EKaWZ3Rrlg72Sq+9SEwJwWWmZizX83sovMwUBMaUp6jWLhAhPpzBW5pfc5YWoc89wxGbELSwzgt5EgHbSJgvDnaHSp3fVaY01wfDXbL/oO160iNe7wv2HLMZu/FkWBkIjz6HmoGJJzYM89bUpHbyYG28lmCHB/8UPog5/BsjOn3/qupgf4zh6mMdMsXLvbR2jVwVjxcEMj9N5nCvc+Y3oi7Mij6VNrWbhkaAJMEzeMhWYrF3/pFQxUqG37aK3d0gw9kp5tMDLIlAPX4y1lfA87pIzoa0+Alql0CJQA1IJvp9SFG7lBmSthWQLmZvwwfoGg/ZjF6rOgsVoZ8TizpQnydWJDr6NboU9LL9Oa64OM5Rs0AU3cR2UbOF4QIcWFJ/7oDe3dOnfZ8QYqx9eXJyxoAUpDanaaTHYBiAKkeOBwQU+MVLKCcONKw9FZclf/1TpDB5b3/JeUFANjHQTv0UXA4YYU7iCx6H7XB4qwwtU9O19CGQYYfCfULX12/fRpYJw6VJaQWyyU4Bn5dk/dcB2nGI36jwbLMfhbUTIApujioAnd/GQIMakHEZ1+syPhMx9BxMkZb99B0A1Q== openpgp:0x4EC95B64"
|
||||||
];
|
];
|
||||||
home-directory = "/home/niten";
|
home-directory = "/home/niten";
|
||||||
home-manager-config = import ../home-manager/niten.nix {
|
home-manager-generator = niten-home-generator.generate-config {
|
||||||
inherit config lib pkgs;
|
username = "niten";
|
||||||
homedir = "/home/niten";
|
user-email = "niten@fudo.org";
|
||||||
|
home-dir = "/home/niten";
|
||||||
};
|
};
|
||||||
k5login = [
|
k5login = [
|
||||||
"niten/root@FUDO.ORG"
|
"niten/root@FUDO.ORG"
|
||||||
|
@ -471,9 +475,10 @@
|
||||||
uid = 10115;
|
uid = 10115;
|
||||||
primary-group = "informis";
|
primary-group = "informis";
|
||||||
common-name = "Viator";
|
common-name = "Viator";
|
||||||
home-manager-config = import ../home-manager/niten.nix {
|
home-manager-generator = niten-home-generator.generate-config {
|
||||||
inherit config lib pkgs;
|
username = "viator";
|
||||||
homedir = "/home/informis/viator";
|
user-email = "viator@informis.land";
|
||||||
|
home-dir = "/home/viator";
|
||||||
};
|
};
|
||||||
ldap-hashed-passwd = "{SSHA}dF/5NGkafL8M1kpa3LYZKdh0Pc7a02gA";
|
ldap-hashed-passwd = "{SSHA}dF/5NGkafL8M1kpa3LYZKdh0Pc7a02gA";
|
||||||
login-hashed-passwd =
|
login-hashed-passwd =
|
||||||
|
|
60
flake.lock
60
flake.lock
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1627649712,
|
|
||||||
"narHash": "sha256-AJBasvMKpsyJmCLdjroBElCHY5AlalbVy+XY5vjbgXc=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "b39647e52ed3c0b989e9d5c965e598ae4c38d7ef",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-21.05",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hosts": {
|
|
||||||
"locked": {
|
|
||||||
"narHash": "sha256-Zbuk45B7idsdhuKwCg7ci8kKM4ts9I4Fw6huDkVZh5c=",
|
|
||||||
"path": "../fudo-hosts",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"path": "../fudo-hosts",
|
|
||||||
"type": "path"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1629033443,
|
|
||||||
"narHash": "sha256-Vo3TvQvR5hsd3incx/xOt6GFgTm651CYVauHS/irOFo=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "8ac785da9843aa110caeed6c912875e46a415a11",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-21.05",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"hosts": "hosts",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
32
flake.nix
32
flake.nix
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
description = "Fudo Host Configuration";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "nixpkgs/nixos-21.05";
|
|
||||||
|
|
||||||
hosts.url = "path:../fudo-hosts";
|
|
||||||
|
|
||||||
home-manager.url = "github:nix-community/home-manager/release-21.05";
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { nixpkgs, hosts, home-manager, ... }: with builtins; let
|
|
||||||
mapAttrs = f: m: listToAttrs
|
|
||||||
(map (k: { name = k; value = f k m.${k}; }) (attrNames m));
|
|
||||||
in {
|
|
||||||
nixosConfigurations = mapAttrs (hostname: hostOpts: let
|
|
||||||
pkgs = import nixpkgs { system = hostOpts.arch; };
|
|
||||||
|
|
||||||
in pkgs.lib.nixosSystem {
|
|
||||||
system = hostOpts.arch;
|
|
||||||
modules = [
|
|
||||||
(import ./initialize.nix {
|
|
||||||
hostname = hostname;
|
|
||||||
home-manager-package = home-manager;
|
|
||||||
pkgs = pkgs;
|
|
||||||
include-secrets = true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}) hosts.host-configs;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -41,9 +41,12 @@ let
|
||||||
steam-with-pipewire =
|
steam-with-pipewire =
|
||||||
(steam.override { extraLibraries = pkgs: [ pkgs.pipewire ]; });
|
(steam.override { extraLibraries = pkgs: [ pkgs.pipewire ]; });
|
||||||
in [
|
in [
|
||||||
|
adapta-backgrounds
|
||||||
exodus
|
exodus
|
||||||
firefox
|
firefox
|
||||||
|
gnome.gnome-backgrounds
|
||||||
jq
|
jq
|
||||||
|
mate.mate-backgrounds
|
||||||
nyxt
|
nyxt
|
||||||
openttd
|
openttd
|
||||||
redshift
|
redshift
|
||||||
|
@ -99,7 +102,7 @@ let
|
||||||
nixfmt
|
nixfmt
|
||||||
nix-index
|
nix-index
|
||||||
nixops
|
nixops
|
||||||
nix-prefetch-git
|
nix-prefetch-scripts
|
||||||
nyxt
|
nyxt
|
||||||
nmap
|
nmap
|
||||||
opencv-java
|
opencv-java
|
||||||
|
|
|
@ -20,7 +20,6 @@ in {
|
||||||
".doom.d" = {
|
".doom.d" = {
|
||||||
source = pkgs.doom-emacs-config;
|
source = pkgs.doom-emacs-config;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
onChange = "${pkgs.doomEmacsInit}/bin/doom-emacs-init.sh";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
".k5login" = {
|
".k5login" = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ hostname, home-manager-package, pkgs, include-secrets ? true, ... }:
|
{ hostname, home-manager-package, pkgs, fudo-pkgs, include-secrets ? true, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
host-config = import (./. + "/config/hosts/${hostname}.nix");
|
host-config = import (./. + "/config/hosts/${hostname}.nix");
|
||||||
|
@ -7,7 +7,10 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
./lib
|
./lib
|
||||||
./config
|
./config
|
||||||
./packages
|
|
||||||
|
# Without turning this into a path, there's a "lastModified missing" error
|
||||||
|
"${fudo-pkgs}/"
|
||||||
|
|
||||||
"${home-manager-package}/nixos"
|
"${home-manager-package}/nixos"
|
||||||
] ++ [
|
] ++ [
|
||||||
(./. + "/config/hardware/${hostname}.nix")
|
(./. + "/config/hardware/${hostname}.nix")
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
with lib; {
|
with lib; {
|
||||||
imports = [
|
imports = [
|
||||||
../config
|
../config
|
||||||
../packages
|
|
||||||
|
|
||||||
./instance.nix
|
./instance.nix
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,15 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
networking.hosts = let
|
||||||
|
other-hosts = filterAttrs
|
||||||
|
(hostname: hostOpts: hostname != config.instance.hostname)
|
||||||
|
cfg.network-definition.hosts;
|
||||||
|
in mapAttrs'
|
||||||
|
(hostname: hostOpts: nameValuePair hostOpts.ipv4-address ["${hostname}.${cfg.domain}" hostname])
|
||||||
|
other-hosts;
|
||||||
|
|
||||||
services.dhcpd4 = let network = cfg.network-definition;
|
services.dhcpd4 = let network = cfg.network-definition;
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -77,8 +77,8 @@ let
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager-config = mkOption {
|
home-manager-generator = mkOption {
|
||||||
type = nullOr attrs;
|
type = nullOr (functionTo attrs);
|
||||||
description = "Home Manager configuration for the given user.";
|
description = "Home Manager configuration for the given user.";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
@ -240,10 +240,11 @@ in {
|
||||||
|
|
||||||
users = let
|
users = let
|
||||||
home-manager-users =
|
home-manager-users =
|
||||||
filterAttrs (username: userOpts: userOpts.home-manager-config != null)
|
filterAttrs (username: userOpts: userOpts.home-manager-generator != null)
|
||||||
sys.local-users;
|
sys.local-users;
|
||||||
in mapAttrs (username: userOpts: userOpts.home-manager-config)
|
in mapAttrs (username: userOpts: userOpts.home-manager-generator {
|
||||||
home-manager-users;
|
enable-gui = host-cfg.enable-gui;
|
||||||
|
}) home-manager-users;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Group home directories have to exist, otherwise users can't log in
|
# Group home directories have to exist, otherwise users can't log in
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
# pkgs.callPackage (pkgs.fetchgit {
|
||||||
|
# url = "https://git.fudo.org/niten/nix-home.git";
|
||||||
|
# rev = "932f49fd76d2283ce6a866a2c8bcc0762bf6af7e";
|
||||||
|
# sha256 = "01dbvy8ry6dsbav74aiyzsswhzwyb3n5qgahigxm17rni4jw8y0g";
|
||||||
|
# }) {}
|
||||||
|
|
||||||
|
pkgs.callPackage ../nix-home {}
|
|
@ -1,14 +1,18 @@
|
||||||
{ nixos-version, ... }:
|
{ nixos-version, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
pkgs = import (builtins.prefetchGit {
|
||||||
|
url = "https://github.com/NixOS/nixpkgs.git";
|
||||||
|
ref = "release-${nixos-version}";
|
||||||
|
}) {};
|
||||||
|
|
||||||
home-manager-package = builtins.fetchGit {
|
home-manager-package = builtins.fetchGit {
|
||||||
url = "https://github.com/nix-community/home-manager.git";
|
url = "https://github.com/nix-community/home-manager.git";
|
||||||
ref = "release-${nixos-version}";
|
ref = "release-${nixos-version}";
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = builtins.fetchGit {
|
fudo-pkgs = builtins.fetchGit {
|
||||||
url = "https://github.com/NixOS/nixpkgs.git";
|
url = "https://git.fudo.org/fudo-public/fudo-pkgs.git";
|
||||||
ref = "release-${nixos-version}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
initialize = import ../../initialize.nix;
|
initialize = import ../../initialize.nix;
|
||||||
|
@ -20,6 +24,7 @@ let
|
||||||
hostname = hostname;
|
hostname = hostname;
|
||||||
home-manager-package = home-manager-package;
|
home-manager-package = home-manager-package;
|
||||||
pkgs = pkgs;
|
pkgs = pkgs;
|
||||||
|
fudo-pkgs = fudo-pkgs;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
network.description = "${domain} network";
|
network.description = "${domain} network";
|
||||||
defaults.nixpkgs.pkgs = system-pkgs "x86_64-linux";
|
defaults.nixpkgs.pkgs = system-pkgs "x86_64-linux";
|
||||||
defaults._module.args = { inherit domain; };
|
defaults._module.args = { inherit domain; };
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
let
|
let
|
||||||
nixos-version = "21.05";
|
nixos-version = "21.05";
|
||||||
|
|
||||||
hosts = import ./lib/hosts.nix { inherit nixos-version; };
|
hostlib = import ./lib/hosts.nix { inherit nixos-version; };
|
||||||
|
|
||||||
define-host = hosts.host-config;
|
define-host = hostlib.host-config;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
network = {
|
network = {
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
{ pkgs, lib, fetchurl, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
version = "2.2.5";
|
|
||||||
url =
|
|
||||||
"https://mirrors.sonic.net/apache/archiva/${version}/binaries/apache-archiva-${version}-bin.tar.gz";
|
|
||||||
sha256 = "01119af2d9950eacbcce0b7f8db5067b166ad26c1e1701bef829105441bb6e29";
|
|
||||||
|
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
name = "archiva-${version}";
|
|
||||||
|
|
||||||
src = builtins.fetchurl {
|
|
||||||
url = url;
|
|
||||||
sha256 = sha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [ stdenv procps makeWrapper ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir $out
|
|
||||||
tar -xzf $src
|
|
||||||
cd apache-archiva-${version}
|
|
||||||
mv {LICENSE,NOTICE,apps,bin,conf,contexts,lib,logs,temp} $out
|
|
||||||
makeWrapper $out/bin/archiva $out/bin/archivaWrapped --set PATH ${
|
|
||||||
lib.makeBinPath [ pkgs.procps ]
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
{ stdenv, fetchgit, pkgs, bundlerEnv }:
|
|
||||||
|
|
||||||
let
|
|
||||||
url = "https://git.fudo.org/fudo-public/backplane-dns-client.git";
|
|
||||||
version = "0.1";
|
|
||||||
srcdir = ../static/backplane-dns-client;
|
|
||||||
gems = bundlerEnv {
|
|
||||||
name = "backplane-dns-client-env";
|
|
||||||
ruby = pkgs.ruby;
|
|
||||||
gemdir = srcdir;
|
|
||||||
};
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
name = "backplane-dns-client-${version}";
|
|
||||||
|
|
||||||
src = srcdir;
|
|
||||||
|
|
||||||
buildInputs = [gems pkgs.ruby];
|
|
||||||
|
|
||||||
phases = ["installPhase"];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/bin" "$out/lib"
|
|
||||||
|
|
||||||
cp "$src/dns-client.rb" "$out/lib"
|
|
||||||
|
|
||||||
BIN="$out/bin/backplane-dns-client"
|
|
||||||
|
|
||||||
cat > $BIN <<EOF
|
|
||||||
#!${pkgs.bash}/bin/bash -e
|
|
||||||
exec ${gems}/bin/bundle exec ${pkgs.ruby}/bin/ruby $out/lib/dns-client.rb "\$@"
|
|
||||||
EOF
|
|
||||||
chmod +x $BIN
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
with pkgs.lib;
|
|
||||||
let
|
|
||||||
launcher = pkgs.writeText "launch-backplane-dns.lisp" ''
|
|
||||||
(require :asdf)
|
|
||||||
(asdf:load-system :backplane-dns)
|
|
||||||
(backplane-dns:start-listener-with-env)
|
|
||||||
(loop (sleep 600))
|
|
||||||
'';
|
|
||||||
|
|
||||||
launcherScript = pkgs.writeShellScriptBin "launch-backplane-dns.sh" ''
|
|
||||||
${pkgs.lispPackages.clwrapper}/bin/common-lisp.sh --load ${launcher}
|
|
||||||
'';
|
|
||||||
|
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "backplane-dns-server";
|
|
||||||
version = "0.1.0";
|
|
||||||
|
|
||||||
propagatedBuildInputs = with pkgs; [
|
|
||||||
asdf
|
|
||||||
sbcl
|
|
||||||
lispPackages.clwrapper
|
|
||||||
localLispPackages.backplane-dns
|
|
||||||
];
|
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/bin"
|
|
||||||
cp ${launcherScript}/bin/launch-backplane-dns.sh "$out/bin"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
with pkgs.lib;
|
|
||||||
let
|
|
||||||
url = "https://git.informis.land/informis/cl-gemini.git";
|
|
||||||
version = "0.1";
|
|
||||||
|
|
||||||
server-launcher = pkgs.writeText "launch-cl-gemini.lisp" ''
|
|
||||||
(defun getenv-or-fail (env-var &optional default)
|
|
||||||
(let ((value (uiop:getenv env-var)))
|
|
||||||
(if (null value)
|
|
||||||
(if default
|
|
||||||
default
|
|
||||||
(uiop:die 1 "unable to find required env var: ~A" env-var))
|
|
||||||
value)))
|
|
||||||
|
|
||||||
(require :asdf)
|
|
||||||
(asdf:load-system :slynk)
|
|
||||||
(asdf:load-system :cl-gemini)
|
|
||||||
(let ((slynk-port (uiop:getenvp "GEMINI_SLYNK_PORT")))
|
|
||||||
(when slynk-port
|
|
||||||
(slynk:create-server :port (parse-integer slynk-port) :dont-close t)))
|
|
||||||
(let ((feed-file (uiop:getenvp "GEMINI_FEEDS")))
|
|
||||||
(when feed-file
|
|
||||||
(load feed-file)))
|
|
||||||
(cl-gemini:start-gemini-server
|
|
||||||
(getenv-or-fail "GEMINI_LISTEN_IP")
|
|
||||||
(getenv-or-fail "GEMINI_PRIVATE_KEY")
|
|
||||||
(getenv-or-fail "GEMINI_CERTIFICATE")
|
|
||||||
:port (parse-integer (getenv-or-fail "GEMINI_LISTEN_PORT"))
|
|
||||||
:document-root (getenv-or-fail "GEMINI_DOCUMENT_ROOT")
|
|
||||||
:textfiles-root (getenv-or-fail "GEMINI_TEXTFILES_ROOT")
|
|
||||||
:log-stream *standard-output*
|
|
||||||
:threaded t
|
|
||||||
:separate-thread t)
|
|
||||||
(loop (sleep 10))
|
|
||||||
'';
|
|
||||||
|
|
||||||
server-wrapper = pkgs.writeShellScript "launch-server.sh" ''
|
|
||||||
${pkgs.lispPackages.clwrapper}/bin/common-lisp.sh --load ${server-launcher}
|
|
||||||
'';
|
|
||||||
|
|
||||||
sbcl-with-ssl = pkgs.sbcl.overrideAttrs (oldAttrs: rec {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [
|
|
||||||
pkgs.openssl_1_1.dev
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
name = "cl-gemini-${version}";
|
|
||||||
|
|
||||||
propagatedBuildInputs = with pkgs; [
|
|
||||||
asdf
|
|
||||||
sbcl-with-ssl
|
|
||||||
localLispPackages.cl-gemini
|
|
||||||
];
|
|
||||||
|
|
||||||
phases = ["installPhase"];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp "${server-wrapper}" "$out/bin/launch-server.sh"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,189 +0,0 @@
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let unstablePkgs = import <nixos-unstable> { };
|
|
||||||
|
|
||||||
in {
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: rec {
|
|
||||||
|
|
||||||
letsencrypt-ca = import ./letsencrypt-ca.nix {
|
|
||||||
stdenv = pkgs.stdenv;
|
|
||||||
fetchurl = builtins.fetchurl;
|
|
||||||
};
|
|
||||||
|
|
||||||
minecraft-current = pkgs.minecraft-server_1_16_4;
|
|
||||||
|
|
||||||
minecraft-server_1_16_4 = pkgs.minecraft-server.overrideAttrs
|
|
||||||
(oldAttrs: rec {
|
|
||||||
version = "1.15.1";
|
|
||||||
src = builtins.fetchurl {
|
|
||||||
url =
|
|
||||||
"https://launcher.mojang.com/v1/objects/35139deedbd5182953cf1caa23835da59ca3d7cd/server.jar";
|
|
||||||
sha256 = "01i5nd03sbnffbyni1fa6hsg5yll2h19vfrpcydlivx10gck0ka4";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
minecraft-server_1_15_1 = pkgs.minecraft-server.overrideAttrs
|
|
||||||
(oldAttrs: rec {
|
|
||||||
version = "1.15.1";
|
|
||||||
src = builtins.fetchurl {
|
|
||||||
url =
|
|
||||||
"https://launcher.mojang.com/v1/objects/4d1826eebac84847c71a77f9349cc22afd0cf0a1/server.jar";
|
|
||||||
sha256 =
|
|
||||||
"a0c062686bee5a92d60802ca74d198548481802193a70dda6d5fe7ecb7207993";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
# DON'T LEAVE THE HASH--Nix will think the package hasn't changed
|
|
||||||
minecraft-server_1_16_1 = let
|
|
||||||
version = "1.16.1";
|
|
||||||
url =
|
|
||||||
"https://launcher.mojang.com/v1/objects/a412fd69db1f81db3f511c1463fd304675244077/server.jar";
|
|
||||||
sha256 = "0nwkdig6yw4cnm2ld78z4j4xzhbm1rwv55vfxz0gzhsbf93xb0i7";
|
|
||||||
in (pkgs.minecraft-server.overrideAttrs (oldAttrs: rec {
|
|
||||||
name = "minecraft-server-${version}";
|
|
||||||
inherit version;
|
|
||||||
src = pkgs.fetchurl { inherit url sha256; };
|
|
||||||
}));
|
|
||||||
|
|
||||||
minecraft-server_1_16_2 = let
|
|
||||||
version = "1.16.2";
|
|
||||||
url =
|
|
||||||
"https://launcher.mojang.com/v1/objects/c5f6fb23c3876461d46ec380421e42b289789530/server.jar";
|
|
||||||
sha256 = "0fbghwrj9b2y9lkn2b17id4ghglwvyvcc8065h582ksfz0zys0i9";
|
|
||||||
in (pkgs.minecraft-server.overrideAttrs (oldAttrs: rec {
|
|
||||||
name = "minecraft-server-${version}";
|
|
||||||
inherit version;
|
|
||||||
src = pkgs.fetchurl { inherit url sha256; };
|
|
||||||
}));
|
|
||||||
|
|
||||||
postgresql_11_gssapi = pkgs.postgresql_11.overrideAttrs (oldAttrs: rec {
|
|
||||||
configureFlags = oldAttrs.configureFlags ++ [ "--with-gssapi" ];
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.krb5 ];
|
|
||||||
});
|
|
||||||
|
|
||||||
postgresql_12_gssapi = pkgs.postgresql_12.overrideAttrs (oldAttrs: rec {
|
|
||||||
configureFlags = oldAttrs.configureFlags ++ [ "--with-gssapi" ];
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.krb5 ];
|
|
||||||
});
|
|
||||||
|
|
||||||
opencv-java = pkgs.opencv.overrideAttrs (oldAttrs: rec {
|
|
||||||
# buildInputs = oldAttrs.buildInputs ++ [ pkgs.ant ];
|
|
||||||
pname = "opencv-java";
|
|
||||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.jdk11 pkgs.ant ];
|
|
||||||
cmakeFlags = oldAttrs.cmakeFlags ++ [ "-DWITH_JAVA=ON" ];
|
|
||||||
});
|
|
||||||
|
|
||||||
hll2380dw-cups = import ./hll2380dw-cups.nix {
|
|
||||||
inherit (pkgs)
|
|
||||||
stdenv fetchurl makeWrapper cups dpkg a2ps ghostscript gnugrep gnused
|
|
||||||
coreutils file perl which lib;
|
|
||||||
};
|
|
||||||
|
|
||||||
hll2380dw-lpr = import ./hll2380dw-lp.nix {
|
|
||||||
inherit (pkgs)
|
|
||||||
stdenv fetchurl makeWrapper cups dpkg a2ps ghostscript gnugrep gnused
|
|
||||||
coreutils file perl which lib;
|
|
||||||
};
|
|
||||||
|
|
||||||
backplane-dns-client = import ./backplane-dns-client.nix {
|
|
||||||
pkgs = pkgs;
|
|
||||||
stdenv = pkgs.stdenv;
|
|
||||||
fetchgit = pkgs.fetchgit;
|
|
||||||
bundlerEnv = pkgs.bundlerEnv;
|
|
||||||
};
|
|
||||||
|
|
||||||
cl-gemini = import ./cl-gemini.nix { inherit pkgs localLispPackages; };
|
|
||||||
|
|
||||||
fudo-service = import ./fudo-service.nix {
|
|
||||||
fetchgit = pkgs.fetchgit;
|
|
||||||
pkgs = pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
google-photos-uploader = pkgs.buildGoModule rec {
|
|
||||||
pname = "google-photos-uploader";
|
|
||||||
version = "1.6.1";
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "int128";
|
|
||||||
repo = "gpup";
|
|
||||||
rev = "${version}";
|
|
||||||
sha256 = "0zdkd5iwkp270p0810dijg25djkzrsdyqiqaqv6rzzgzj5d5pwhm";
|
|
||||||
};
|
|
||||||
|
|
||||||
modSha256 = "15ndc6jq51f9mz1v089416x2lxrifp3wglbxpff8b055jj07hbkw";
|
|
||||||
|
|
||||||
subPackages = [ "." ];
|
|
||||||
|
|
||||||
meta = with pkgs.lib; {
|
|
||||||
description = "Google photos uploader, written in Go.";
|
|
||||||
homepage = "https://github.com/int128/gpup";
|
|
||||||
license = licenses.asl20;
|
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
doomEmacsInit = pkgs.writeShellScriptBin "doom-emacs-init.sh" ''
|
|
||||||
DOOMDIR=$HOME/.emacs.d
|
|
||||||
|
|
||||||
function clone_into() {
|
|
||||||
${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs.git $1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -d "$DOOMDIR" ]; then
|
|
||||||
clone_into $DOOMDIR
|
|
||||||
$DOOMDIR/bin/doom -y install
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f $DOOMDIR/bin/doom ]; then
|
|
||||||
# legacy...move to a backup
|
|
||||||
mv $HOME/.emacs.d $HOME/.emacs.d.bak
|
|
||||||
mv $HOME/.emacs $HOME/.emacs.bak
|
|
||||||
clone_into $DOOMDIR
|
|
||||||
$DOOMDIR/bin/doom -y install
|
|
||||||
fi
|
|
||||||
|
|
||||||
$DOOMDIR/bin/doom sync
|
|
||||||
|
|
||||||
#if ${pkgs.emacs}/bin/emacsclient -ca false -e '(delete-frame)'; then
|
|
||||||
# # emacs is running
|
|
||||||
# ${pkgs.emacs}/bin/emacsclient -e '(doom/reload)'
|
|
||||||
#fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
localLispPackages = (import ./lisp { inherit pkgs localLispPackages; })
|
|
||||||
// pkgs.lispPackages;
|
|
||||||
|
|
||||||
backplane-dns-server = import ./backplane-dns-server.nix {
|
|
||||||
inherit localLispPackages;
|
|
||||||
pkgs = unstablePkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
doom-emacs-config = builtins.fetchGit {
|
|
||||||
url = "https://git.fudo.org/niten/doom-emacs.git";
|
|
||||||
# rev = "42f747cdf232718a6ebaccb9ab10ee3e1d33e10f";
|
|
||||||
# sha256 = "1mpmbb4xqgiqhxrdl6pbds6z8riwqszr61vxfdxlxsyzkks71zgj";
|
|
||||||
};
|
|
||||||
|
|
||||||
vanilla-forum = import ./vanilla-forum.nix { pkgs = pkgs; };
|
|
||||||
|
|
||||||
openttd-data = pkgs.fetchgit {
|
|
||||||
url = "https://git.fudo.org/fudo-public/openttd-data.git";
|
|
||||||
rev = "5b7dd0ca9014e642e1f2d0aa3154b5da869911d3";
|
|
||||||
sha256 = "061k0f0jgm5k81djslb172xk0wkis0m878izgisyj2qgg3wf1awh";
|
|
||||||
};
|
|
||||||
|
|
||||||
textfiles = pkgs.fetchgit {
|
|
||||||
url = "https://git.informis.land/informis/textfiles.git";
|
|
||||||
rev = "278a90f7ce219e36e5de0a80b540e469a9bce912";
|
|
||||||
sha256 = "06qns3ayc84mamdgn0jw652rvx60wy9km1vxm2361mzmx2zk89iw";
|
|
||||||
};
|
|
||||||
|
|
||||||
clj2nix = pkgs.callPackage (pkgs.fetchgit {
|
|
||||||
url = "https://github.com/hlolli/clj2nix.git";
|
|
||||||
rev = "e6d09dd8c5cda68eb0534bd8501f2d5dcd7b2e95";
|
|
||||||
sha256 = "0v0q6iglr0lx13j1snzd8mjxids1af1p2h7bkvmsyk2bfp36naqx";
|
|
||||||
}) { };
|
|
||||||
|
|
||||||
flatpak = pkgs.callPackage ./flatpak { };
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c
|
|
||||||
index 9e885070..d02eeb8c 100644
|
|
||||||
--- a/icon-validator/validate-icon.c
|
|
||||||
+++ b/icon-validator/validate-icon.c
|
|
||||||
@@ -156,8 +156,8 @@ rerun_in_sandbox (const char *arg_width,
|
|
||||||
"--unshare-ipc",
|
|
||||||
"--unshare-net",
|
|
||||||
"--unshare-pid",
|
|
||||||
- "--ro-bind", "/usr", "/usr",
|
|
||||||
- "--ro-bind", "/etc/ld.so.cache", "/etc/ld.so.cache",
|
|
||||||
+ "--ro-bind", "@storeDir@", "@storeDir@",
|
|
||||||
+ "--ro-bind", "/run/current-system", "/run/current-system",
|
|
||||||
"--ro-bind", validate_icon, validate_icon,
|
|
||||||
NULL);
|
|
||||||
|
|
|
@ -1,165 +0,0 @@
|
||||||
# NOTE TO FUTURE SELF: Nixpkgs Flatpak is currently only at 10.2, which doesn't
|
|
||||||
# allow nested containers...no Steam.
|
|
||||||
|
|
||||||
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, docbook_xml_dtd_45
|
|
||||||
, docbook-xsl-nons, which, libxml2, gobject-introspection, gtk-doc, intltool
|
|
||||||
, libxslt, pkg-config, xmlto, appstream-glib, substituteAll, bison
|
|
||||||
, xdg-dbus-proxy, p11-kit, bubblewrap, bzip2, dbus, glib, gpgme, json-glib
|
|
||||||
, libarchive, libcap, libseccomp, coreutils, socat, gettext, hicolor-icon-theme
|
|
||||||
, shared-mime-info, desktop-file-utils, gtk3, fuse, nixosTests, libsoup, xz
|
|
||||||
, zstd, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking
|
|
||||||
, wrapGAppsNoGuiHook, dconf, gsettings-desktop-schemas, librsvg }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "flatpak";
|
|
||||||
version = "1.11.2";
|
|
||||||
|
|
||||||
# TODO: split out lib once we figure out what to do with triggerdir
|
|
||||||
outputs = [ "out" "dev" "man" "doc" "devdoc" "installedTests" ];
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url =
|
|
||||||
"https://github.com/flatpak/flatpak/releases/download/${version}/${pname}-${version}.tar.xz";
|
|
||||||
sha256 = "1136kg3pqb2ab6ykyj642wj8i395xx61macmakpxw4cbbn1wz6c7";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Hardcode paths used by tests and change test runtime generation to use files from Nix store.
|
|
||||||
# https://github.com/flatpak/flatpak/issues/1460
|
|
||||||
(substituteAll {
|
|
||||||
src = ./fix-test-paths.patch;
|
|
||||||
inherit coreutils gettext socat gtk3;
|
|
||||||
smi = shared-mime-info;
|
|
||||||
dfu = desktop-file-utils;
|
|
||||||
hicolorIconTheme = hicolor-icon-theme;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Hardcode paths used by Flatpak itself.
|
|
||||||
(substituteAll {
|
|
||||||
src = ./fix-paths.patch;
|
|
||||||
p11kit = "${p11-kit.dev}/bin/p11-kit";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Adapt paths exposed to sandbox for NixOS.
|
|
||||||
(substituteAll {
|
|
||||||
src = ./bubblewrap-paths.patch;
|
|
||||||
inherit (builtins) storeDir;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Allow gtk-doc to find schemas using XML_CATALOG_FILES environment variable.
|
|
||||||
# Patch taken from gtk-doc expression.
|
|
||||||
./respect-xml-catalog-files-var.patch
|
|
||||||
|
|
||||||
# Don’t hardcode flatpak binary path in launchers stored under user’s profile otherwise they will break after Flatpak update.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/43581
|
|
||||||
./use-flatpak-from-path.patch
|
|
||||||
|
|
||||||
# Hardcode flatpak binary path for flatpak-spawn.
|
|
||||||
# When calling the portal’s Spawn command with FLATPAK_SPAWN_FLAGS_CLEAR_ENV flag,
|
|
||||||
# it will clear environment, including PATH, making the flatpak run fail.
|
|
||||||
# https://github.com/flatpak/flatpak/pull/4174
|
|
||||||
# (fetchpatch {
|
|
||||||
# url =
|
|
||||||
# "https://github.com/flatpak/flatpak/commit/495449daf6d3c072519a36c9e4bc6cc1da4d31db.patch";
|
|
||||||
# sha256 = "gOX/sGupAE7Yg3MVrMhFXzWHpFn+izVyjtkuPzIckuY=";
|
|
||||||
# })
|
|
||||||
|
|
||||||
# Nix environment hacks should not leak into the apps.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/53441
|
|
||||||
./unset-env-vars.patch
|
|
||||||
|
|
||||||
# But we want the GDK_PIXBUF_MODULE_FILE from the wrapper affect the icon validator.
|
|
||||||
./validate-icon-pixbuf.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
autoreconfHook
|
|
||||||
libxml2
|
|
||||||
docbook_xml_dtd_45
|
|
||||||
docbook-xsl-nons
|
|
||||||
which
|
|
||||||
gobject-introspection
|
|
||||||
gtk-doc
|
|
||||||
intltool
|
|
||||||
libxslt
|
|
||||||
pkg-config
|
|
||||||
xmlto
|
|
||||||
appstream-glib
|
|
||||||
bison
|
|
||||||
wrapGAppsNoGuiHook
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
bubblewrap
|
|
||||||
bzip2
|
|
||||||
dbus
|
|
||||||
dconf
|
|
||||||
gpgme
|
|
||||||
json-glib
|
|
||||||
libarchive
|
|
||||||
libcap
|
|
||||||
libseccomp
|
|
||||||
libsoup
|
|
||||||
xz
|
|
||||||
zstd
|
|
||||||
polkit
|
|
||||||
python3
|
|
||||||
systemd
|
|
||||||
xorg.libXau
|
|
||||||
fuse
|
|
||||||
gsettings-desktop-schemas
|
|
||||||
glib-networking
|
|
||||||
librsvg # for flatpak-validate-icon
|
|
||||||
];
|
|
||||||
|
|
||||||
# Required by flatpak.pc
|
|
||||||
propagatedBuildInputs = [ glib ostree ];
|
|
||||||
|
|
||||||
checkInputs = [ valgrind ];
|
|
||||||
|
|
||||||
# TODO: some issues with temporary files
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
NIX_LDFLAGS = "-lpthread";
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
"--with-system-bubblewrap=${bubblewrap}/bin/bwrap"
|
|
||||||
"--with-system-dbus-proxy=${xdg-dbus-proxy}/bin/xdg-dbus-proxy"
|
|
||||||
"--with-dbus-config-dir=${placeholder "out"}/share/dbus-1/system.d"
|
|
||||||
"--localstatedir=/var"
|
|
||||||
"--enable-gtk-doc"
|
|
||||||
"--enable-installed-tests"
|
|
||||||
];
|
|
||||||
|
|
||||||
makeFlags = [
|
|
||||||
"installed_testdir=${
|
|
||||||
placeholder "installedTests"
|
|
||||||
}/libexec/installed-tests/flatpak"
|
|
||||||
"installed_test_metadir=${
|
|
||||||
placeholder "installedTests"
|
|
||||||
}/share/installed-tests/flatpak"
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = let vsc-py = python3.withPackages (pp: [ pp.pyparsing ]);
|
|
||||||
in ''
|
|
||||||
patchShebangs buildutil
|
|
||||||
patchShebangs tests
|
|
||||||
PATH=${
|
|
||||||
lib.makeBinPath [ vsc-py ]
|
|
||||||
}:$PATH patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
tests = { installedTests = nixosTests.installed-tests.flatpak; };
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Linux application sandboxing and distribution framework";
|
|
||||||
homepage = "https://flatpak.org/";
|
|
||||||
license = licenses.lgpl21Plus;
|
|
||||||
maintainers = with maintainers; [ jtojnar ];
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
diff --git a/session-helper/flatpak-session-helper.c b/session-helper/flatpak-session-helper.c
|
|
||||||
index 5dd7629e..ddc71a4c 100644
|
|
||||||
--- a/session-helper/flatpak-session-helper.c
|
|
||||||
+++ b/session-helper/flatpak-session-helper.c
|
|
||||||
@@ -693,7 +693,7 @@ start_p11_kit_server (const char *flatpak_dir)
|
|
||||||
g_auto(GStrv) stdout_lines = NULL;
|
|
||||||
int i;
|
|
||||||
char *p11_argv[] = {
|
|
||||||
- "p11-kit", "server",
|
|
||||||
+ "@p11kit@", "server",
|
|
||||||
/* We explicitly request --sh here, because we then fail on earlier versions that doesn't support
|
|
||||||
* this flag. This is good, because those earlier versions did not properly daemonize and caused
|
|
||||||
* the spawn_sync to hang forever, waiting for the pipe to close.
|
|
||||||
@@ -836,7 +836,7 @@ main (int argc,
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (g_find_program_in_path ("p11-kit"))
|
|
||||||
+ if (TRUE)
|
|
||||||
start_p11_kit_server (flatpak_dir);
|
|
||||||
else
|
|
||||||
g_debug ("p11-kit not found");
|
|
|
@ -1,205 +0,0 @@
|
||||||
diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c
|
|
||||||
index 43fd0563..4067bd36 100644
|
|
||||||
--- a/app/flatpak-builtins-build-export.c
|
|
||||||
+++ b/app/flatpak-builtins-build-export.c
|
|
||||||
@@ -458,7 +458,7 @@ validate_desktop_file (GFile *desktop_file,
|
|
||||||
subprocess = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE |
|
|
||||||
G_SUBPROCESS_FLAGS_STDERR_PIPE |
|
|
||||||
G_SUBPROCESS_FLAGS_STDERR_MERGE,
|
|
||||||
- &local_error, "desktop-file-validate", path, NULL);
|
|
||||||
+ &local_error, "@dfu@/bin/desktop-file-validate", path, NULL);
|
|
||||||
if (!subprocess)
|
|
||||||
{
|
|
||||||
if (!g_error_matches (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
|
|
||||||
diff --git a/tests/libtest.sh b/tests/libtest.sh
|
|
||||||
index acb2095b..b361da16 100644
|
|
||||||
--- a/tests/libtest.sh
|
|
||||||
+++ b/tests/libtest.sh
|
|
||||||
@@ -431,7 +431,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then
|
|
||||||
# running installed-tests: assume we know what we're doing
|
|
||||||
_flatpak_bwrap_works=true
|
|
||||||
elif ! "$FLATPAK_BWRAP" --unshare-ipc --unshare-net --unshare-pid \
|
|
||||||
- --ro-bind / / /bin/true > bwrap-result 2>&1; then
|
|
||||||
+ --ro-bind / / @coreutils@/bin/true > bwrap-result 2>&1; then
|
|
||||||
_flatpak_bwrap_works=false
|
|
||||||
else
|
|
||||||
_flatpak_bwrap_works=true
|
|
||||||
@@ -504,7 +504,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
|
|
||||||
export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
|
|
||||||
DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
|
|
||||||
|
|
||||||
-if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
|
|
||||||
+if ! @coreutils@/bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
|
|
||||||
assert_not_reached "Failed to start dbus-daemon"
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -519,7 +519,7 @@ commit_to_path () {
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup () {
|
|
||||||
- /bin/kill -9 $DBUS_SESSION_BUS_PID
|
|
||||||
+ @coreutils@/bin/kill -9 $DBUS_SESSION_BUS_PID
|
|
||||||
gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true
|
|
||||||
fusermount -u $XDG_RUNTIME_DIR/doc || :
|
|
||||||
kill $(jobs -p) &> /dev/null || true
|
|
||||||
diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh
|
|
||||||
index 612f914f..4b890da2 100755
|
|
||||||
--- a/tests/make-test-app.sh
|
|
||||||
+++ b/tests/make-test-app.sh
|
|
||||||
@@ -151,13 +151,13 @@ msgid "Hello world"
|
|
||||||
msgstr "Hallo Welt"
|
|
||||||
EOF
|
|
||||||
mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES
|
|
||||||
-msgfmt --output-file ${DIR}/files/de/share/de/LC_MESSAGES/helloworld.mo de.po
|
|
||||||
+@gettext@/bin/msgfmt --output-file ${DIR}/files/de/share/de/LC_MESSAGES/helloworld.mo de.po
|
|
||||||
cat > fr.po <<EOF
|
|
||||||
msgid "Hello world"
|
|
||||||
msgstr "Bonjour le monde"
|
|
||||||
EOF
|
|
||||||
mkdir -p ${DIR}/files/fr/share/fr/LC_MESSAGES
|
|
||||||
-msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po
|
|
||||||
+@gettext@/bin/msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po
|
|
||||||
|
|
||||||
flatpak build-finish ${DIR}
|
|
||||||
mkdir -p repos
|
|
||||||
diff --git a/tests/make-test-runtime.sh b/tests/make-test-runtime.sh
|
|
||||||
index af289625..7db51c17 100755
|
|
||||||
--- a/tests/make-test-runtime.sh
|
|
||||||
+++ b/tests/make-test-runtime.sh
|
|
||||||
@@ -28,9 +28,10 @@ EOF
|
|
||||||
|
|
||||||
# On Debian derivatives, /usr/sbin and /sbin aren't in ordinary users'
|
|
||||||
# PATHs, but ldconfig is kept in /sbin
|
|
||||||
-PATH="$PATH:/usr/sbin:/sbin"
|
|
||||||
+PATH="$PATH:@socat@/bin:/usr/sbin:/sbin"
|
|
||||||
|
|
||||||
# Add bash and dependencies
|
|
||||||
+mkdir -p ${DIR}/nix/store
|
|
||||||
mkdir -p ${DIR}/usr/bin
|
|
||||||
mkdir -p ${DIR}/usr/lib
|
|
||||||
ln -s ../lib ${DIR}/usr/lib64
|
|
||||||
@@ -40,40 +41,17 @@ if test -f /sbin/ldconfig.real; then
|
|
||||||
else
|
|
||||||
cp `which ldconfig` ${DIR}/usr/bin
|
|
||||||
fi
|
|
||||||
-LIBS=`mktemp`
|
|
||||||
-BINS=`mktemp`
|
|
||||||
-
|
|
||||||
-add_bin() {
|
|
||||||
- local f=$1
|
|
||||||
- shift
|
|
||||||
-
|
|
||||||
- if grep -qFe "${f}" $BINS; then
|
|
||||||
- # Already handled
|
|
||||||
- return 0
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- echo $f >> $BINS
|
|
||||||
-
|
|
||||||
- # Add library dependencies
|
|
||||||
- (ldd "${f}" | sed "s/.* => //" | awk '{ print $1}' | grep ^/ | sort -u -o $LIBS $LIBS -) || true
|
|
||||||
-
|
|
||||||
- local shebang=$(sed -n '1s/^#!\([^ ]*\).*/\1/p' "${f}")
|
|
||||||
- if [ x$shebang != x ]; then
|
|
||||||
- add_bin "$shebang"
|
|
||||||
- fi
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
for i in $@ bash ls cat echo readlink socat; do
|
|
||||||
- I=`which $i`
|
|
||||||
- add_bin $I
|
|
||||||
-done
|
|
||||||
-for i in `cat $BINS`; do
|
|
||||||
- #echo Adding binary $i 1>&2
|
|
||||||
- cp "$i" ${DIR}/usr/bin/
|
|
||||||
-done
|
|
||||||
-for i in `cat $LIBS`; do
|
|
||||||
- #echo Adding library $i 1>&2
|
|
||||||
- cp "$i" ${DIR}/usr/lib/
|
|
||||||
+ I=$(readlink -f $(which $i))
|
|
||||||
+ [ -e ${DIR}/usr/bin/$i ] && continue
|
|
||||||
+ requisites=$(nix-store --query --requisites "$I")
|
|
||||||
+ for r in $requisites; do
|
|
||||||
+ # a single store item can be needed by multiple paths, no need to copy it again
|
|
||||||
+ if [ ! -e ${DIR}/$r ]; then
|
|
||||||
+ cp -r $r ${DIR}/$r
|
|
||||||
+ fi
|
|
||||||
+ done
|
|
||||||
+ ln -s $I ${DIR}/usr/bin/$i
|
|
||||||
done
|
|
||||||
ln -s bash ${DIR}/usr/bin/sh
|
|
||||||
|
|
||||||
@@ -84,11 +62,13 @@ echo "Hello world, from a runtime$EXTRA"
|
|
||||||
EOF
|
|
||||||
chmod a+x ${DIR}/usr/bin/runtime_hello.sh
|
|
||||||
|
|
||||||
-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but
|
|
||||||
-# the real en_US locale is often not available, because its in the
|
|
||||||
-# local archive.
|
|
||||||
-mkdir -p ${DIR}/usr/lib/locale/
|
|
||||||
-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US
|
|
||||||
+# We do not copy C.UTF8 locale because it is in locale archive and
|
|
||||||
+# that is already copied with glibc.
|
|
||||||
+
|
|
||||||
+mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store
|
|
||||||
+chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed
|
|
||||||
+find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths
|
|
||||||
+find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets
|
|
||||||
|
|
||||||
if [ x$COLLECTION_ID != x ]; then
|
|
||||||
collection_args=--collection-id=${COLLECTION_ID}
|
|
||||||
diff --git a/tests/testlibrary.c b/tests/testlibrary.c
|
|
||||||
index 509ce6cc..6a333c9c 100644
|
|
||||||
--- a/tests/testlibrary.c
|
|
||||||
+++ b/tests/testlibrary.c
|
|
||||||
@@ -1399,7 +1399,7 @@ check_bwrap_support (void)
|
|
||||||
{
|
|
||||||
gint exit_code = 0;
|
|
||||||
char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net",
|
|
||||||
- "--unshare-pid", "--ro-bind", "/", "/", "/bin/true", NULL };
|
|
||||||
+ "--unshare-pid", "--ro-bind", "/", "/", "@coreutils@/bin/true", NULL };
|
|
||||||
g_autofree char *argv_str = g_strjoinv (" ", argv);
|
|
||||||
g_test_message ("Spawning %s", argv_str);
|
|
||||||
g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &exit_code, &error);
|
|
||||||
diff --git a/triggers/desktop-database.trigger b/triggers/desktop-database.trigger
|
|
||||||
index 2188f535..d8283061 100755
|
|
||||||
--- a/triggers/desktop-database.trigger
|
|
||||||
+++ b/triggers/desktop-database.trigger
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
-if test \( -x "$(which update-desktop-database 2>/dev/null)" \) -a \( -d $1/exports/share/applications \); then
|
|
||||||
- exec update-desktop-database -q $1/exports/share/applications
|
|
||||||
+if test \( -d $1/exports/share/applications \); then
|
|
||||||
+ exec @dfu@/bin/update-desktop-database -q $1/exports/share/applications
|
|
||||||
fi
|
|
||||||
diff --git a/triggers/gtk-icon-cache.trigger b/triggers/gtk-icon-cache.trigger
|
|
||||||
index 711cfab2..07baa2ac 100755
|
|
||||||
--- a/triggers/gtk-icon-cache.trigger
|
|
||||||
+++ b/triggers/gtk-icon-cache.trigger
|
|
||||||
@@ -1,10 +1,10 @@
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
-if test \( -x "$(which gtk-update-icon-cache 2>/dev/null)" \) -a \( -d $1/exports/share/icons/hicolor \); then
|
|
||||||
- cp /usr/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/
|
|
||||||
+if test \( -d $1/exports/share/icons/hicolor \); then
|
|
||||||
+ cp @hicolorIconTheme@/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/
|
|
||||||
for dir in $1/exports/share/icons/*; do
|
|
||||||
if test -f $dir/index.theme; then
|
|
||||||
- if ! gtk-update-icon-cache --quiet $dir; then
|
|
||||||
+ if ! @gtk3@/bin/gtk-update-icon-cache --quiet $dir; then
|
|
||||||
echo "Failed to run gtk-update-icon-cache for $dir"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
diff --git a/triggers/mime-database.trigger b/triggers/mime-database.trigger
|
|
||||||
index 2067d8ec..a49a8777 100755
|
|
||||||
--- a/triggers/mime-database.trigger
|
|
||||||
+++ b/triggers/mime-database.trigger
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
-if test \( -x "$(which update-mime-database 2>/dev/null)" \) -a \( -d $1/exports/share/mime/packages \); then
|
|
||||||
- exec update-mime-database $1/exports/share/mime
|
|
||||||
+if test \( -d $1/exports/share/mime/packages \); then
|
|
||||||
+ exec @smi@/bin/update-mime-database $1/exports/share/mime
|
|
||||||
fi
|
|
|
@ -1,15 +0,0 @@
|
||||||
diff --git a/acinclude.m4 b/acinclude.m4
|
|
||||||
index 92ec3985..b3fccf1d 100644
|
|
||||||
--- a/acinclude.m4
|
|
||||||
+++ b/acinclude.m4
|
|
||||||
@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
|
|
||||||
[
|
|
||||||
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
|
|
||||||
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
|
|
||||||
- if $jh_found_xmlcatalog && \
|
|
||||||
- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
|
|
||||||
+ # empty argument forces libxml to use XML_CATALOG_FILES variable
|
|
||||||
+ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
|
|
||||||
AC_MSG_RESULT([found])
|
|
||||||
ifelse([$3],,,[$3
|
|
||||||
])dnl
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/common/flatpak-run.c b/common/flatpak-run.c
|
|
||||||
index 8d52d3a5..81700183 100644
|
|
||||||
--- a/common/flatpak-run.c
|
|
||||||
+++ b/common/flatpak-run.c
|
|
||||||
@@ -1232,6 +1232,7 @@ static const ExportData default_exports[] = {
|
|
||||||
{"PERLLIB", NULL},
|
|
||||||
{"PERL5LIB", NULL},
|
|
||||||
{"XCURSOR_PATH", NULL},
|
|
||||||
+ {"GDK_PIXBUF_MODULE_FILE", NULL},
|
|
||||||
};
|
|
||||||
|
|
||||||
static const ExportData no_ld_so_cache_exports[] = {
|
|
|
@ -1,50 +0,0 @@
|
||||||
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
|
|
||||||
index 52b222ea..9489441f 100644
|
|
||||||
--- a/common/flatpak-dir.c
|
|
||||||
+++ b/common/flatpak-dir.c
|
|
||||||
@@ -6956,7 +6956,7 @@ export_desktop_file (const char *app,
|
|
||||||
|
|
||||||
new_exec = g_string_new ("");
|
|
||||||
g_string_append_printf (new_exec,
|
|
||||||
- FLATPAK_BINDIR "/flatpak run --branch=%s --arch=%s",
|
|
||||||
+ "flatpak run --branch=%s --arch=%s",
|
|
||||||
escaped_branch,
|
|
||||||
escaped_arch);
|
|
||||||
|
|
||||||
@@ -8290,8 +8290,8 @@ flatpak_dir_deploy (FlatpakDir *self,
|
|
||||||
error))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
- bin_data = g_strdup_printf ("#!/bin/sh\nexec %s/flatpak run --branch=%s --arch=%s %s \"$@\"\n",
|
|
||||||
- FLATPAK_BINDIR, escaped_branch, escaped_arch, escaped_app);
|
|
||||||
+ bin_data = g_strdup_printf ("#!/bin/sh\nexec flatpak run --branch=%s --arch=%s %s \"$@\"\n",
|
|
||||||
+ escaped_branch, escaped_arch, escaped_app);
|
|
||||||
if (!g_file_replace_contents (wrapper, bin_data, strlen (bin_data), NULL, FALSE,
|
|
||||||
G_FILE_CREATE_REPLACE_DESTINATION, NULL, cancellable, error))
|
|
||||||
return FALSE;
|
|
||||||
diff --git a/tests/test-bundle.sh b/tests/test-bundle.sh
|
|
||||||
index d1682344..5e2b9a97 100755
|
|
||||||
--- a/tests/test-bundle.sh
|
|
||||||
+++ b/tests/test-bundle.sh
|
|
||||||
@@ -67,7 +67,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/files
|
|
||||||
assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/export
|
|
||||||
assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
|
|
||||||
# Ensure Exec key is rewritten
|
|
||||||
-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=master --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
|
||||||
+assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=master --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
|
||||||
assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
|
|
||||||
assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png
|
|
||||||
|
|
||||||
diff --git a/tests/test-run.sh b/tests/test-run.sh
|
|
||||||
index fecb756e..64043281 100644
|
|
||||||
--- a/tests/test-run.sh
|
|
||||||
+++ b/tests/test-run.sh
|
|
||||||
@@ -45,7 +45,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/files
|
|
||||||
assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/export
|
|
||||||
assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
|
|
||||||
# Ensure Exec key is rewritten
|
|
||||||
-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
|
||||||
+assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
|
||||||
assert_has_file $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini
|
|
||||||
assert_file_has_content $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini "^DefaultDisabled=true$"
|
|
||||||
assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c
|
|
||||||
index 9e885070..44fea035 100644
|
|
||||||
--- a/icon-validator/validate-icon.c
|
|
||||||
+++ b/icon-validator/validate-icon.c
|
|
||||||
@@ -200,6 +200,8 @@ rerun_in_sandbox (const char *arg_width,
|
|
||||||
add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL);
|
|
||||||
if (g_getenv ("G_MESSAGES_PREFIXED"))
|
|
||||||
add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL);
|
|
||||||
+ if (g_getenv ("GDK_PIXBUF_MODULE_FILE"))
|
|
||||||
+ add_args (args, "--setenv", "GDK_PIXBUF_MODULE_FILE", g_getenv ("GDK_PIXBUF_MODULE_FILE"), NULL);
|
|
||||||
|
|
||||||
add_args (args, validate_icon, arg_width, arg_height, filename, NULL);
|
|
||||||
g_ptr_array_add (args, NULL);
|
|
|
@ -1,44 +0,0 @@
|
||||||
{ stdenv, lib, fetchurl, makeWrapper, cups, dpkg, a2ps, ghostscript, gnugrep
|
|
||||||
, gnused, coreutils, file, perl, which }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "hll2380dw-cups";
|
|
||||||
version = "3.2.0-1";
|
|
||||||
platform = "i386";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url =
|
|
||||||
"https://download.brother.com/welcome/dlf101772/hll2380dwcupswrapper-${version}.i386.deb";
|
|
||||||
sha256 = "08g3kx5lgwzb3f9ypj8knmpkkj0h3kv1i4gd20rzjxrx6vx1wbpl";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
buildInputs = [ cups ghostscript dpkg a2ps ];
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
dpkg-deb -x $src $out
|
|
||||||
wrapProgram $out/opt/brother/Printers/HLL2380DW/cupswrapper/paperconfigml1 \
|
|
||||||
--prefix PATH : ${
|
|
||||||
lib.makeBinPath [ coreutils ghostscript gnugrep gnused ]
|
|
||||||
}
|
|
||||||
mkdir -p $out/lib/cups/filter/
|
|
||||||
ln -s $out/opt/brother/Printers/HLL2380DW/cupswrapper/brother_lpdwrapper_HLL2380DW \
|
|
||||||
$out/lib/cups/filter/brother_lpdwrapper_HLL2380DW
|
|
||||||
ln -s $out/opt/brother/Printers/HLL2380DW/paperconfigml1 \
|
|
||||||
$out/lib/cups/filter/
|
|
||||||
mkdir -p $out/share/cups/model
|
|
||||||
ln -s $out/opt/brother/Printers/HLL2380DW/cupswrapper/brother-HLL2380DW-cups-en.ppd $out/share/cups/model/
|
|
||||||
touch $out/HI
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "http://www.brother.com/";
|
|
||||||
description = "Brother HL-L2380DW combined print driver";
|
|
||||||
license = licenses.unfree;
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
downloadPage =
|
|
||||||
"http://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=hll2380dw_us&os=128";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
{ lib, stdenv, fetchurl, makeWrapper, cups, dpkg, a2ps, ghostscript, gnugrep
|
|
||||||
, gnused, coreutils, file, perl, which }:
|
|
||||||
|
|
||||||
let
|
|
||||||
model = "hll2380dw";
|
|
||||||
version = "3.2.0-1";
|
|
||||||
src = fetchurl {
|
|
||||||
url =
|
|
||||||
"https://download.brother.com/welcome/dlf101771/hll2380dwlpr-${version}.i386.deb";
|
|
||||||
sha256 = "08g3kx5lgwzb3f9ypj8knmpkkj0h3kv1i4gd20rzjxrx6vx1wbpx";
|
|
||||||
};
|
|
||||||
reldir = "opt/brother/Printers/${model}/";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
inherit src version;
|
|
||||||
pname = "${model}-lpr";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
|
||||||
|
|
||||||
unpackPhase = "dpkg-deb -x $src $out";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
DIR="$out/${reldir}"
|
|
||||||
substituteInPlace $dir/lpd/filter_${model} \
|
|
||||||
--replace /usr/bin/perl ${perl}/bin/perl \
|
|
||||||
--replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \
|
|
||||||
--replace "PRINTER =~" "PRINTER = \"${model}\"; #"
|
|
||||||
wrapProgram $dir/lpd/filter_${model} \
|
|
||||||
--prefix PATH : ${
|
|
||||||
lib.makeBinPath [ coreutils ghostscript gnugrep gnused which ]
|
|
||||||
}
|
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
||||||
$dir/lpd/${model}filter
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = "http://www.brother.com/";
|
|
||||||
description = "Brother ${lib.toUpper model} LPR print driver";
|
|
||||||
license = lib.licenses.unfree;
|
|
||||||
platforms = [ "i386" "x86_64-linux" ];
|
|
||||||
downloadPage =
|
|
||||||
"http://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=hll2380dw_us&os=128";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
{ stdenv, fetchurl }:
|
|
||||||
|
|
||||||
let
|
|
||||||
url = "https://letsencrypt.org/certs/letsencryptauthorityx3.pem.txt";
|
|
||||||
sha256 = "b6dd03f7fb8508e4f7ffe82ca8a3f98dde163e0bd44897e112a0850a5b606acf";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
|
|
||||||
name = "letsencrypt-ca";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
name = "isrgrootx1.pem.txt";
|
|
||||||
url = url;
|
|
||||||
sha256 = sha256;
|
|
||||||
};
|
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -pv $out/etc/ssl/letsencrypt
|
|
||||||
cp -v $src $out/etc/ssl/letsencrypt/ca.pem
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = https://letsencrypt.com;
|
|
||||||
description = "Certificate Authority (CA) certificate for LetsEncrypt";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "agnostic-lizard";
|
|
||||||
packageName = "agnostic-lizard";
|
|
||||||
description = "Agnostic Lizard is a portable implementation of a code walker and in particular of the macroexpand-all function (and macro) that makes a best effort to be correct while not expecting much beyond what the Common Lisp standard requires.";
|
|
||||||
|
|
||||||
buildSystems = [ "agnostic-lizard" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://gitlab.common-lisp.net/mraskin/agnostic-lizard.git";
|
|
||||||
rev = "fe3a73719f05901c8819f8995a3ebae738257952";
|
|
||||||
sha256 = "0ax78y8w4zlp5dcwyhz2nq7j3shi49qn31dkfg8lv2jlg7mkwh2d";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "agnostic-lizard.asd" ];
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "arrows";
|
|
||||||
packageName = "arrows";
|
|
||||||
description = "Clojure-style arrows for Common Lisp";
|
|
||||||
|
|
||||||
buildSystems = [ "arrows" ];
|
|
||||||
|
|
||||||
deps = [];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://gitlab.com/Harleqin/arrows.git";
|
|
||||||
rev = "df7cf0067e0132d9697ac8b1a4f1b9c88d4f5382";
|
|
||||||
sha256 = "042k9vkssrqx9nhp14wdzm942zgdxvp35mba0p2syz98i75im2yy";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "arrows.asd" ];
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
{ pkgs, backplane-server, arrows, ip-utils, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "backplane-dns";
|
|
||||||
packageName = "backplane-dns";
|
|
||||||
description = "XMPP Backplane DNS Server";
|
|
||||||
|
|
||||||
buildSystems = [ "backplane-dns" ];
|
|
||||||
|
|
||||||
deps = with pkgs.lispPackages; [
|
|
||||||
arrows
|
|
||||||
alexandria
|
|
||||||
backplane-server
|
|
||||||
cl-ppcre
|
|
||||||
ip-utils
|
|
||||||
postmodern
|
|
||||||
prove
|
|
||||||
trivia
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://git.fudo.org/fudo-public/backplane-dns.git";
|
|
||||||
rev = "3075453a8ccc8bf285bfc83d84317044590ae060";
|
|
||||||
sha256 = "1sdgr9zxqam4c8f7nlkgm77si45j0qvvgj6rav9kd6jz6vqgcbi5";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "backplane-dns.asd" ];
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ pkgs, lib, arrows, cl-xmpp, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "backplane-server";
|
|
||||||
packageName = "backplane-server";
|
|
||||||
description = "XMPP Backplane Server";
|
|
||||||
|
|
||||||
buildSystems = [ "backplane-server" ];
|
|
||||||
|
|
||||||
deps = with pkgs.lispPackages; [ alexandria arrows cl-json cl-xmpp prove ];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://git.fudo.org/fudo-public/backplane-server.git";
|
|
||||||
rev = "5b50dd8badf5b5460e9cc7e76e191d274712a3bd";
|
|
||||||
sha256 = "18fysksmrbfk131fgazbw1cpaxz47015ashap9y4rswd904dzzss";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "backplane-server.asd" ];
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
url = "https://git.informis.land/informis/cl-gemini.git";
|
|
||||||
rev = "1d5075c23237deec536f62ed5dc06f3845eacf6b";
|
|
||||||
sha256 = "0j7gz3c83cgishsraqvm1dw42x5c1ydx26jrmkvykljyfhisyjpm";
|
|
||||||
|
|
||||||
in pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "cl-gemini";
|
|
||||||
packageName = "cl-gemini";
|
|
||||||
description = "Gemini server written in Common Lisp.";
|
|
||||||
|
|
||||||
buildSystems = [ "cl-gemini" ];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = url;
|
|
||||||
rev = rev;
|
|
||||||
sha256 = sha256;
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
alexandria
|
|
||||||
arrows
|
|
||||||
asdf-package-system
|
|
||||||
asdf-system-connections
|
|
||||||
cl_plus_ssl
|
|
||||||
cl-ppcre
|
|
||||||
fare-mop
|
|
||||||
file-types
|
|
||||||
inferior-shell
|
|
||||||
local-time
|
|
||||||
osicat
|
|
||||||
quicklisp
|
|
||||||
quri
|
|
||||||
slynk
|
|
||||||
# slynk-asdf
|
|
||||||
slynk-macrostep
|
|
||||||
slynk-stepper
|
|
||||||
uiop
|
|
||||||
usocket-server
|
|
||||||
xml-emitter
|
|
||||||
];
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "cl-gemini.asd" ];
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
description = "SASL package for common lisp";
|
|
||||||
baseName = "cl-sasl";
|
|
||||||
packageName = "cl-sasl";
|
|
||||||
|
|
||||||
buildSystems = [ "cl-sasl" ];
|
|
||||||
|
|
||||||
deps = with pkgs.lispPackages; [
|
|
||||||
ironclad
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "legoscia";
|
|
||||||
repo = "cl-sasl";
|
|
||||||
rev = "64f195c0756cb80fa5961c072b62907be20a7380";
|
|
||||||
sha256 = "0a05q8rls2hn46rbbk6w5km9kqvhsj365zlw6hp32724xy2nd98w";
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "cl-sasl.asd" ];
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
{ pkgs, cl-sasl, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "cl-xmpp";
|
|
||||||
packageName = "cl-xmpp";
|
|
||||||
description = "XMPP library for Common Lisp";
|
|
||||||
|
|
||||||
buildSystems = [
|
|
||||||
"cl-xmpp"
|
|
||||||
"cl-xmpp-sasl"
|
|
||||||
"cl-xmpp-tls"
|
|
||||||
];
|
|
||||||
|
|
||||||
deps = with pkgs.lispPackages; [
|
|
||||||
cl-base64
|
|
||||||
cl_plus_ssl
|
|
||||||
cl-sasl
|
|
||||||
cxml
|
|
||||||
ironclad
|
|
||||||
usocket
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "j4yk";
|
|
||||||
repo = "cl-xmpp";
|
|
||||||
rev = "a0f206e583c72d80523bdf108e7d507597555c6d";
|
|
||||||
sha256 = "16qwm7yvwi73q07rsg0i5wrxbv44wm75m3710ph0vf1lzdkrsizk";
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [
|
|
||||||
"cl-xmpp.asd"
|
|
||||||
"cl-xmpp-sasl.asd"
|
|
||||||
"cl-xmpp-tls.asd"
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
rec {
|
|
||||||
agnostic-lizard = import ./agnostic-lizard.nix { inherit pkgs localLispPackages; };
|
|
||||||
arrows = import ./arrows.nix { inherit pkgs localLispPackages; };
|
|
||||||
cl-gemini = import ./cl-gemini.nix { inherit pkgs localLispPackages; };
|
|
||||||
cl-sasl = import ./cl-sasl.nix { inherit pkgs localLispPackages; };
|
|
||||||
cl-xmpp = import ./cl-xmpp.nix { inherit pkgs localLispPackages; };
|
|
||||||
backplane-dns = import ./backplane-dns.nix { inherit pkgs localLispPackages; };
|
|
||||||
backplane-server = import ./backplane-server.nix { inherit pkgs localLispPackages; };
|
|
||||||
fare-mop = import ./fare-mop.nix { inherit pkgs localLispPackages; };
|
|
||||||
file-types = import ./file-types.nix { inherit pkgs localLispPackages; };
|
|
||||||
inferior-shell = import ./inferior-shell.nix { inherit pkgs localLispPackages; };
|
|
||||||
ip-utils = import ./ip-utils.nix { inherit pkgs localLispPackages; };
|
|
||||||
osicat = import ./osicat.nix { inherit pkgs localLispPackages; };
|
|
||||||
slynk = import ./slynk.nix { inherit pkgs localLispPackages; };
|
|
||||||
slynk-asdf = import ./slynk-asdf.nix { inherit pkgs localLispPackages; };
|
|
||||||
slynk-macrostep = import ./slynk-macrostep.nix { inherit pkgs localLispPackages; };
|
|
||||||
slynk-stepper = import ./slynk-stepper.nix { inherit pkgs localLispPackages; };
|
|
||||||
usocket-server = import ./usocket-server.nix { inherit pkgs localLispPackages; };
|
|
||||||
xml-emitter = import ./xml-emitter.nix { inherit pkgs localLispPackages; };
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "fare-mop";
|
|
||||||
packageName = "fare-mop";
|
|
||||||
description = "fare-mop has a few simple utilities relying on the MOP.";
|
|
||||||
|
|
||||||
buildSystems = [ "fare-mop" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
closer-mop
|
|
||||||
fare-utils
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/fare/fare-mop.git";
|
|
||||||
rev = "538aa94590a0354f382eddd9238934763434af30";
|
|
||||||
sha256 = "0maxs8392953fhnaa6zwnm2mdbhxjxipp4g4rvypm06ixr6pyv1c";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "fare-mop.asd" ];
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "file-types";
|
|
||||||
packageName = "file-types";
|
|
||||||
description = "Simple scheme to classify file types in a hierarchical fashion. Includes support for associating and querying MIME types.";
|
|
||||||
|
|
||||||
buildSystems = [ "file-types" ];
|
|
||||||
|
|
||||||
deps = [];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/eugeneia/file-types.git";
|
|
||||||
rev = "6f5676b2781f617b6009ae4ce001496ea43b6fac";
|
|
||||||
sha256 = "09l67gzjwx7kx237grm709dsj9rkmmm8s3ya6irmcw8nh587inbs";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "file-types.asd" ];
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "inferior-shell";
|
|
||||||
packageName = "inferior-shell";
|
|
||||||
description = "This CL library allows you to spawn local or remote processes and shell pipes.";
|
|
||||||
|
|
||||||
buildSystems = [ "inferior-shell" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
pkgs.asdf
|
|
||||||
alexandria
|
|
||||||
fare-mop
|
|
||||||
fare-quasiquote-extras
|
|
||||||
fare-utils
|
|
||||||
trivia
|
|
||||||
trivia_dot_quasiquote
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/fare/inferior-shell.git";
|
|
||||||
rev = "15c2d04a7398db965ea1c3ba2d49efa7c851f2c2";
|
|
||||||
sha256 = "02qx37zzk5j4xmwh77k2qa2wvnzvaj6qml5dh2q7b6b1ljvgcj4m";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "inferior-shell.asd" ];
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "ip-utils";
|
|
||||||
packageName = "ip-utils";
|
|
||||||
description = "Simple Common Lisp utility functions for working with IPs";
|
|
||||||
|
|
||||||
buildSystems = [ "ip-utils" ];
|
|
||||||
|
|
||||||
deps = with pkgs.lispPackages; [
|
|
||||||
cl-ppcre
|
|
||||||
split-sequence
|
|
||||||
trivia
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://git.fudo.org/fudo-public/ip-utils.git";
|
|
||||||
rev = "bf590d0eeab9496bc47db43c997dfe9f0151163a";
|
|
||||||
sha256 = "19n17pdzyl8j0fw82dr8lrjy6hkcagszm8kbyv8qbv2jl80176hp";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "ip-utils.asd" ];
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "osicat";
|
|
||||||
packageName = "osicat";
|
|
||||||
description = "Osicat is a lightweight operating system interface for Common Lisp on Unix-platforms.";
|
|
||||||
|
|
||||||
buildSystems = [ "osicat" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
alexandria
|
|
||||||
cffi-grovel
|
|
||||||
trivial-features
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/osicat/osicat.git";
|
|
||||||
rev = "e635611710fe053b4bbb7e8cc950a524f6061562";
|
|
||||||
sha256 = "1lib65qkwkywmnkgnnbqvfypv82rds7cdaygjmi32d337f82ljzg";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "osicat.asd" ];
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "slynk-asdf";
|
|
||||||
packageName = "slynk-asdf";
|
|
||||||
description = "SLY-ASDF is a contrib for SLY that adds support for editing ASDF systems, exposing several utilities for working with and loading systems.";
|
|
||||||
|
|
||||||
buildSystems = [ "slynk-asdf" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
slynk
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/mmgeorge/sly-asdf.git";
|
|
||||||
rev = "95ca71ddeb6132c413e1e4352b136f41ed9254f1";
|
|
||||||
sha256 = "1dvjwdan3qd3x716zgziy5vbq2972rz8pdqi7b40haqg01f33qf4";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "slynk-asdf.asd" ];
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "slynk-macrostep";
|
|
||||||
packageName = "slynk-macrostep";
|
|
||||||
description = "sly-macrostep is a SLY contrib for expanding CL macros right inside the source file.";
|
|
||||||
|
|
||||||
buildSystems = [ "slynk-macrostep" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
slynk
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/joaotavora/sly-macrostep.git";
|
|
||||||
rev = "5113e4e926cd752b1d0bcc1508b3ebad5def5fad";
|
|
||||||
sha256 = "1nxf28gn4f3n0wnv7nb5sgl36fz175y470zs9hig4kq8cp0yal0r";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "slynk-macrostep.asd" ];
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "slynk-stepper";
|
|
||||||
packageName = "slynk-stepper";
|
|
||||||
description = "A portable Common Lisp stepper interface.";
|
|
||||||
|
|
||||||
buildSystems = [ "slynk-stepper" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
agnostic-lizard
|
|
||||||
slynk
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/joaotavora/sly-stepper.git";
|
|
||||||
rev = "ec3c0a7f3c8b82926882e5fcfdacf67b86d989f8";
|
|
||||||
sha256 = "1hxniaxifdw3m4y4yssgy22xcmmf558wx7rpz66wy5hwybjslf7b";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "slynk-stepper.asd" ];
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "slynk";
|
|
||||||
packageName = "slynk";
|
|
||||||
description = "SLY is Sylvester the Cat's Common Lisp IDE for Emacs.";
|
|
||||||
|
|
||||||
buildSystems = [
|
|
||||||
"slynk"
|
|
||||||
"slynk/arglists"
|
|
||||||
"slynk/fancy-inspector"
|
|
||||||
"slynk/package-fu"
|
|
||||||
"slynk/mrepl"
|
|
||||||
"slynk/trace-dialog"
|
|
||||||
"slynk/profiler"
|
|
||||||
"slynk/stickers"
|
|
||||||
"slynk/stickers"
|
|
||||||
"slynk/indentation"
|
|
||||||
"slynk/retro"
|
|
||||||
];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/joaotavora/sly.git";
|
|
||||||
rev = "1.0.43";
|
|
||||||
sha256 = "11yclc8i6gpy26m1yj6bid6da22639zpil1qzj87m5gfvxiv4zg6";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "slynk/slynk.asd" ];
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "usocket-server";
|
|
||||||
packageName = "usocket-server";
|
|
||||||
description = "This is the usocket Common Lisp sockets library: a library to bring sockets access to the broadest of common lisp implementations as possible.";
|
|
||||||
|
|
||||||
buildSystems = [ "usocket" "usocket-server" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
bordeaux-threads
|
|
||||||
split-sequence
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/usocket/usocket.git";
|
|
||||||
rev = "0e2c23192a74bd654b43528f41b62ee69a06b821";
|
|
||||||
sha256 = "18z49j9hdazvy1bf0hc4w4k9iavm1nagfbrbbp8ry1r3y7np6by6";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "usocket.asd" "usocket-server.asd" ];
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ pkgs, localLispPackages, ... }:
|
|
||||||
|
|
||||||
pkgs.lispPackages.buildLispPackage {
|
|
||||||
baseName = "xml-emitter";
|
|
||||||
packageName = "xml-emitter";
|
|
||||||
description = "Map Lisp to XML.";
|
|
||||||
|
|
||||||
buildSystems = [ "xml-emitter" ];
|
|
||||||
|
|
||||||
deps = with localLispPackages; [
|
|
||||||
cl-utilities
|
|
||||||
];
|
|
||||||
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "https://github.com/VitoVan/xml-emitter.git";
|
|
||||||
rev = "1a93a5ab084a10f3b527db3043bd0ba5868404bf";
|
|
||||||
sha256 = "1w9yx8gc4imimvjqkhq8yzpg3kjrp2y37rjix5c1lnz4s7bxvhk9";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
asdFilesToKeep = [ "xml-emitter.asd" ];
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
# NOT USED, CAN DELETE
|
|
||||||
|
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
let version = "3.3";
|
|
||||||
|
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "vanilla-forum";
|
|
||||||
version = version;
|
|
||||||
|
|
||||||
src = builtins.fetchurl {
|
|
||||||
name = "vanilla-forum-${version}.zip";
|
|
||||||
url = "https://us.v-cdn.net/5018160/uploads/addons/3JQXC5NIGUWR.zip";
|
|
||||||
sha256 = "13062ar0mdaaihzj6jx9kjvfvsg3km8khvad1rm9cqxviim9rzv3";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [ unzip ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir $out
|
|
||||||
cp -aR -t $out applications bootstrap.php dist js library locales plugins resources themes uploads vendor
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = "http://vanillaforums.com/";
|
|
||||||
description = "Vanilla Web Forum";
|
|
||||||
downloadPage = "https://open.vanillaforums.com/download";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
source 'https://rubygems.org'
|
|
||||||
|
|
||||||
gem "xmpp4r"
|
|
|
@ -1,13 +0,0 @@
|
||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
xmpp4r (0.5.6)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
xmpp4r
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
1.17.2
|
|
|
@ -1,297 +0,0 @@
|
||||||
|
|
||||||
require "ipaddr"
|
|
||||||
require "socket"
|
|
||||||
require "optparse"
|
|
||||||
require "json"
|
|
||||||
require "securerandom"
|
|
||||||
|
|
||||||
require "xmpp4r"
|
|
||||||
|
|
||||||
puts ARGV
|
|
||||||
|
|
||||||
options = {}
|
|
||||||
OptionParser.new do |opts|
|
|
||||||
opts.banner = "usage: ${$0} [opts]"
|
|
||||||
|
|
||||||
opts.on("-i", "--interface=INTERFACE",
|
|
||||||
"Publicly-accessible interface") do |interface|
|
|
||||||
options[:interface] = interface
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.on("-d", "--domain=DOMAIN",
|
|
||||||
"Domain on which we wish to set the new ip") do |domain|
|
|
||||||
options[:domain] = domain
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.on("-s", "--server=SERVER",
|
|
||||||
"Backplane DNS XMPP server") do |server|
|
|
||||||
options[:server] = server
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.on("-p", "--password-file=/path/to/file",
|
|
||||||
"File containing password for XMPP server") do |pw_file|
|
|
||||||
options[:pw_file] = pw_file
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.on("-4", "--ipv4",
|
|
||||||
"Check for a public IPv4 and register with the backplane.") do
|
|
||||||
options[:ipv4] = true
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.on("-6", "--ipv6",
|
|
||||||
"Check for a public IPv6 and register with the backplane.") do
|
|
||||||
options[:ipv6] = true
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.on("-f", "--sshfp=FILE",
|
|
||||||
"Register host SSH key fingerprints with the backplane.") do |file|
|
|
||||||
options[:sshfp] = [] if not options[:sshfp]
|
|
||||||
options[:sshfp] = options[:sshfp] + [file]
|
|
||||||
end
|
|
||||||
end.parse!
|
|
||||||
|
|
||||||
def error(msg)
|
|
||||||
puts msg
|
|
||||||
throw msg
|
|
||||||
end
|
|
||||||
|
|
||||||
error("domain is required") if not options[:domain]
|
|
||||||
error("server is required") if not options[:server]
|
|
||||||
error("password file is required") if not options[:pw_file]
|
|
||||||
error("at least one of -4 or -6 required") if not (options[:ipv4] or options[:ipv6])
|
|
||||||
|
|
||||||
if not File::readable?(options[:pw_file])
|
|
||||||
error("file does not exist or is not readable")
|
|
||||||
end
|
|
||||||
password = File::open(options[:pw_file]) { |f| f.gets.strip }
|
|
||||||
|
|
||||||
class XMPPClient
|
|
||||||
def initialize(domain, hostname, server, password)
|
|
||||||
@jid = "host-#{hostname}@#{server}"
|
|
||||||
@service_jid = "service-dns@#{server}"
|
|
||||||
@server = server
|
|
||||||
@domain = domain
|
|
||||||
@password = password
|
|
||||||
@responses = Queue.new
|
|
||||||
@responses_lock = Mutex.new
|
|
||||||
end
|
|
||||||
|
|
||||||
def connect
|
|
||||||
disconnect if connected?
|
|
||||||
@client = Jabber::Client::new(@jid)
|
|
||||||
@client.connect # will use SRV records
|
|
||||||
error("failed to initialize TLS connection") if not @client.is_tls?
|
|
||||||
@client.auth(@password)
|
|
||||||
register_response_callback
|
|
||||||
end
|
|
||||||
|
|
||||||
def connected?
|
|
||||||
@client ||= nil
|
|
||||||
@client.respond_to?(:is_connected?) and @client.is_connected?
|
|
||||||
end
|
|
||||||
|
|
||||||
def disconnect
|
|
||||||
if @client.respond_to?(:is_connected?) && @client.is_connected?
|
|
||||||
begin
|
|
||||||
@client.close
|
|
||||||
rescue Errno::EPIPE, IOError => e
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@client = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def send(msg_content)
|
|
||||||
msg_id = SecureRandom::uuid
|
|
||||||
encoded_payload = payload(msg_content, msg_id).to_json
|
|
||||||
puts "payload: #{encoded_payload}"
|
|
||||||
msg = Jabber::Message.new(@service_jid, encoded_payload)
|
|
||||||
msg.type = :chat
|
|
||||||
@client.send(msg)
|
|
||||||
response = receive_response(msg_id)
|
|
||||||
puts "response: #{response}"
|
|
||||||
response and response["status"] == "OK"
|
|
||||||
end
|
|
||||||
|
|
||||||
def send_ip(ip)
|
|
||||||
send(ip_payload(ip))
|
|
||||||
end
|
|
||||||
|
|
||||||
def send_sshfp(fps)
|
|
||||||
send(sshfp_payload(fps))
|
|
||||||
end
|
|
||||||
|
|
||||||
def payload(req, msg_id)
|
|
||||||
{
|
|
||||||
version: 1,
|
|
||||||
service: :dns,
|
|
||||||
msgid: msg_id,
|
|
||||||
payload: req
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def ip_payload(ip)
|
|
||||||
{
|
|
||||||
request: ip.ipv4? ? :change_ipv4 : :change_ipv6,
|
|
||||||
domain: @domain,
|
|
||||||
ip: ip.to_s
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def sshfp_payload(fp)
|
|
||||||
{
|
|
||||||
request: :change_sshfp,
|
|
||||||
domain: @domain,
|
|
||||||
sshfp: fp
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def register_response_callback
|
|
||||||
@client.add_message_callback do |msg|
|
|
||||||
enqueue_message(JSON.parse(msg.body))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def enqueue_message(msg)
|
|
||||||
@responses << msg
|
|
||||||
end
|
|
||||||
|
|
||||||
def receive_response(msg_id)
|
|
||||||
msg = @responses.pop
|
|
||||||
return msg if (msg and (msg["msgid"] == msg_id.to_s))
|
|
||||||
raise "failed to receive message: #{msg}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
RESERVED_V4_NETWORKS = [
|
|
||||||
"0.0.0.0/8",
|
|
||||||
"10.0.0.0/8",
|
|
||||||
"100.64.0.0/10",
|
|
||||||
"127.0.0.0/8",
|
|
||||||
"169.254.0.0/16",
|
|
||||||
"172.16.0.0/12",
|
|
||||||
"192.0.0.0/24",
|
|
||||||
"192.0.2.0/24",
|
|
||||||
"192.88.99.0/24",
|
|
||||||
"192.168.0.0/16",
|
|
||||||
"198.18.0.0/15",
|
|
||||||
"198.51.100.0/24",
|
|
||||||
"203.0.113.0/24",
|
|
||||||
"224.0.0.0/4",
|
|
||||||
"240.0.0.0/4",
|
|
||||||
"255.255.255.255/32"
|
|
||||||
].map { |ip| IPAddr.new(ip) }
|
|
||||||
|
|
||||||
def public_ip?(ip)
|
|
||||||
if (ip.ipv4?)
|
|
||||||
not RESERVED_V4_NETWORKS.any? { |network| network.include? ip }
|
|
||||||
elsif (ip.ipv6?)
|
|
||||||
not (ip.link_local? or ip.loopback? or ip.private?)
|
|
||||||
else
|
|
||||||
false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_ipaddr(addrinfo)
|
|
||||||
if addrinfo.ipv4?
|
|
||||||
IPAddr.new addrinfo.ip_address
|
|
||||||
else
|
|
||||||
IPAddr.new(addrinfo.ip_address.split("%")[0])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def local_addresses
|
|
||||||
Socket::ip_address_list.map do |addrinfo|
|
|
||||||
to_ipaddr(addrinfo)
|
|
||||||
end.select { |ip| public_ip?(ip) }
|
|
||||||
end
|
|
||||||
|
|
||||||
def interface_addresses(interface)
|
|
||||||
Socket::getifaddrs.select do |ifaddr|
|
|
||||||
ifaddr.name == interface
|
|
||||||
end.select do |ifaddr|
|
|
||||||
ifaddr.addr.ip? and (ifaddr.flags & Socket::IFF_MULTICAST != 0)
|
|
||||||
end.map do |ifaddr|
|
|
||||||
to_ipaddr(ifaddr.addr)
|
|
||||||
end.filter do |ip|
|
|
||||||
public_ip? ip
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def host_sshfp(keys)
|
|
||||||
keys.flat_map { |keyfile|
|
|
||||||
`ssh-keygen -r hostname #{keyfile}`.split("\n")
|
|
||||||
}.map { |fp|
|
|
||||||
fp..match(/[0-9] [0-9] [a-fA-F0-9]{32,64}$/)[0]
|
|
||||||
}.compact
|
|
||||||
end
|
|
||||||
|
|
||||||
def hostname
|
|
||||||
Socket.gethostname.split(".").first
|
|
||||||
end
|
|
||||||
|
|
||||||
client = XMPPClient::new(options[:domain],
|
|
||||||
hostname,
|
|
||||||
options[:server],
|
|
||||||
password)
|
|
||||||
|
|
||||||
success = true
|
|
||||||
|
|
||||||
begin
|
|
||||||
client.connect
|
|
||||||
|
|
||||||
addrs = if options[:interface]
|
|
||||||
interface_addresses(options[:interface])
|
|
||||||
else
|
|
||||||
local_addresses
|
|
||||||
end
|
|
||||||
|
|
||||||
if options[:ipv4]
|
|
||||||
ipv4 = addrs.find { |ip| ip.ipv4? }
|
|
||||||
if ipv4
|
|
||||||
puts "#{options[:server]}: #{hostname}.#{options[:domain]} IN A => #{ipv4.to_s}"
|
|
||||||
if client.send_ip(ipv4)
|
|
||||||
puts "OK"
|
|
||||||
else
|
|
||||||
puts "ERROR"
|
|
||||||
success = false
|
|
||||||
end
|
|
||||||
else
|
|
||||||
puts "#{options[:server]}: no valid public IPv4 found on the local host"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if options[:ipv6]
|
|
||||||
ipv6 = addrs.find { |ip| ip.ipv6? }
|
|
||||||
if ipv6
|
|
||||||
puts "#{options[:server]}: #{hostname}.#{options[:domain]} IN AAAA => #{ipv6.to_s}"
|
|
||||||
if client.send_ip(ipv6)
|
|
||||||
puts "OK"
|
|
||||||
else
|
|
||||||
puts "ERROR"
|
|
||||||
success = false
|
|
||||||
end
|
|
||||||
else
|
|
||||||
puts "#{options[:server]}: no valid public IPv6 found on the local host"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if options[:sshfp]
|
|
||||||
fps = host_sshfp(options[:sshfp])
|
|
||||||
if not fps.empty?
|
|
||||||
puts "#{options[:server]}: #{hostname}.#{options[:domain]} IN SSHFP => #{fps}"
|
|
||||||
if client.send_sshfp(fps)
|
|
||||||
puts "OK"
|
|
||||||
else
|
|
||||||
puts "ERROR"
|
|
||||||
success = false
|
|
||||||
end
|
|
||||||
else
|
|
||||||
puts "#{options[:server]}: no valid sshfps found"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
ensure
|
|
||||||
client.disconnect
|
|
||||||
end
|
|
||||||
|
|
||||||
exit success ? 0 : 1
|
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
xmpp4r = {
|
|
||||||
groups = ["default"];
|
|
||||||
platforms = [];
|
|
||||||
source = {
|
|
||||||
remotes = ["https://rubygems.org"];
|
|
||||||
sha256 = "15ls2yqjvflxrc8chv5pcdh2p1p9fjsky74yc8y7wvw90wz0izrb";
|
|
||||||
type = "gem";
|
|
||||||
};
|
|
||||||
version = "0.5.6";
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue