commit
6451e9d4a5
@ -0,0 +1,152 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.services.dragonflydb; |
||||
dragonflydb = pkgs.dragonflydb; |
||||
|
||||
settings = |
||||
{ |
||||
port = cfg.port; |
||||
dir = "/var/lib/dragonflydb"; |
||||
keys_output_limit = cfg.keysOutputLimit; |
||||
} // |
||||
(lib.optionalAttrs (cfg.bind != null) { bind = cfg.bind; }) // |
||||
(lib.optionalAttrs (cfg.requirePass != null) { requirepass = cfg.requirePass; }) // |
||||
(lib.optionalAttrs (cfg.maxMemory != null) { maxmemory = cfg.maxMemory; }) // |
||||
(lib.optionalAttrs (cfg.memcachePort != null) { memcache_port = cfg.memcachePort; }) // |
||||
(lib.optionalAttrs (cfg.dbNum != null) { dbnum = cfg.dbNum; }) // |
||||
(lib.optionalAttrs (cfg.cacheMode != null) { cache_mode = cfg.cacheMode; }); |
||||
in |
||||
{ |
||||
|
||||
###### interface |
||||
|
||||
options = { |
||||
services.dragonflydb = { |
||||
enable = mkEnableOption "DragonflyDB"; |
||||
|
||||
user = mkOption { |
||||
type = types.str; |
||||
default = "dragonfly"; |
||||
description = "The user to run DragonflyDB as"; |
||||
}; |
||||
|
||||
port = mkOption { |
||||
type = types.port; |
||||
default = 6379; |
||||
description = "The TCP port to accept connections."; |
||||
}; |
||||
|
||||
bind = mkOption { |
||||
type = with types; nullOr str; |
||||
default = "127.0.0.1"; |
||||
description = '' |
||||
The IP interface to bind to. |
||||
<literal>null</literal> means "all interfaces". |
||||
''; |
||||
}; |
||||
|
||||
requirePass = mkOption { |
||||
type = with types; nullOr str; |
||||
default = null; |
||||
description = "Password for database"; |
||||
example = "letmein!"; |
||||
}; |
||||
|
||||
maxMemory = mkOption { |
||||
type = with types; nullOr ints.unsigned; |
||||
default = null; |
||||
description = '' |
||||
The maximum amount of memory to use for storage (in bytes). |
||||
<literal>null</literal> means this will be automatically set. |
||||
''; |
||||
}; |
||||
|
||||
memcachePort = mkOption { |
||||
type = with types; nullOr port; |
||||
default = null; |
||||
description = '' |
||||
To enable memcached compatible API on this port. |
||||
<literal>null</literal> means disabled. |
||||
''; |
||||
}; |
||||
|
||||
keysOutputLimit = mkOption { |
||||
type = types.ints.unsigned; |
||||
default = 8192; |
||||
description = '' |
||||
Maximum number of returned keys in keys command. |
||||
<literal>keys</literal> is a dangerous command. |
||||
We truncate its result to avoid blowup in memory when fetching too many keys. |
||||
''; |
||||
}; |
||||
|
||||
dbNum = mkOption { |
||||
type = with types; nullOr ints.unsigned; |
||||
default = null; |
||||
description = "Maximum number of supported databases for <literal>select</literal>"; |
||||
}; |
||||
|
||||
cacheMode = mkOption { |
||||
type = with types; nullOr bool; |
||||
default = null; |
||||
description = '' |
||||
Once this mode is on, Dragonfly will evict items least likely to be stumbled |
||||
upon in the future but only when it is near maxmemory limit. |
||||
''; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
###### implementation |
||||
|
||||
config = mkIf config.services.dragonflydb.enable { |
||||
|
||||
users.users = optionalAttrs (cfg.user == "dragonfly") { |
||||
dragonfly.description = "DragonflyDB server user"; |
||||
dragonfly.isSystemUser = true; |
||||
dragonfly.group = "dragonfly"; |
||||
}; |
||||
users.groups = optionalAttrs (cfg.user == "dragonfly") { dragonfly = { }; }; |
||||
|
||||
environment.systemPackages = [ dragonflydb ]; |
||||
|
||||
systemd.services.dragonflydb = { |
||||
description = "DragonflyDB server"; |
||||
|
||||
wantedBy = [ "multi-user.target" ]; |
||||
after = [ "network.target" ]; |
||||
|
||||
serviceConfig = { |
||||
ExecStart = "${dragonflydb}/bin/dragonfly --alsologtostderr ${builtins.concatStringsSep " " (attrsets.mapAttrsToList (n: v: "--${n} ${strings.escapeShellArg v}") settings)}"; |
||||
|
||||
User = cfg.user; |
||||
|
||||
# Filesystem access |
||||
ReadWritePaths = [ settings.dir ]; |
||||
StateDirectory = "dragonflydb"; |
||||
StateDirectoryMode = "0700"; |
||||
# Process Properties |
||||
LimitMEMLOCK = "infinity"; |
||||
# Caps |
||||
CapabilityBoundingSet = ""; |
||||
NoNewPrivileges = true; |
||||
# Sandboxing |
||||
ProtectSystem = "strict"; |
||||
ProtectHome = true; |
||||
PrivateTmp = true; |
||||
PrivateDevices = true; |
||||
ProtectKernelTunables = true; |
||||
ProtectKernelModules = true; |
||||
ProtectControlGroups = true; |
||||
LockPersonality = true; |
||||
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ]; |
||||
RestrictRealtime = true; |
||||
PrivateMounts = true; |
||||
MemoryDenyWriteExecute = true; |
||||
}; |
||||
}; |
||||
}; |
||||
} |
@ -0,0 +1,60 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
let |
||||
cfg = config.services.persistent-evdev; |
||||
settingsFormat = pkgs.formats.json {}; |
||||
|
||||
configFile = settingsFormat.generate "persistent-evdev-config" { |
||||
cache = "/var/cache/persistent-evdev"; |
||||
devices = lib.mapAttrs (virt: phys: "/dev/input/by-id/${phys}") cfg.devices; |
||||
}; |
||||
in |
||||
{ |
||||
options.services.persistent-evdev = { |
||||
enable = lib.mkEnableOption "virtual input devices that persist even if the backing device is hotplugged"; |
||||
|
||||
devices = lib.mkOption { |
||||
default = {}; |
||||
type = with lib.types; attrsOf str; |
||||
description = '' |
||||
A set of virtual proxy device labels with backing physical device ids. |
||||
|
||||
Physical devices should already exist in <filename class="devicefile">/dev/input/by-id/</filename>. |
||||
Proxy devices will be automatically given a <literal>uinput-</literal> prefix. |
||||
|
||||
See the <link xlink:href="https://github.com/aiberia/persistent-evdev#example-usage-with-libvirt"> |
||||
project page</link> for example configuration of virtual devices with libvirt |
||||
and remember to add <literal>uinput-*</literal> devices to the qemu |
||||
<literal>cgroup_device_acl</literal> list (see <xref linkend="opt-virtualisation.libvirtd.qemu.verbatimConfig"/>). |
||||
''; |
||||
example = lib.literalExpression '' |
||||
{ |
||||
persist-mouse0 = "usb-Logitech_G403_Prodigy_Gaming_Mouse_078738533531-event-if01"; |
||||
persist-mouse1 = "usb-Logitech_G403_Prodigy_Gaming_Mouse_078738533531-event-mouse"; |
||||
persist-mouse2 = "usb-Logitech_G403_Prodigy_Gaming_Mouse_078738533531-if01-event-kbd"; |
||||
persist-keyboard0 = "usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-event-kbd"; |
||||
persist-keyboard1 = "usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-if01-event-kbd"; |
||||
} |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = lib.mkIf cfg.enable { |
||||
|
||||
systemd.services.persistent-evdev = { |
||||
documentation = [ "https://github.com/aiberia/persistent-evdev/blob/master/README.md" ]; |
||||
description = "Persistent evdev proxy"; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
|
||||
serviceConfig = { |
||||
Restart = "on-failure"; |
||||
ExecStart = "${pkgs.persistent-evdev}/bin/persistent-evdev.py ${configFile}"; |
||||
CacheDirectory = "persistent-evdev"; |
||||
}; |
||||
}; |
||||
|
||||
services.udev.packages = [ pkgs.persistent-evdev ]; |
||||
}; |
||||
|
||||
meta.maintainers = with lib.maintainers; [ lodi ]; |
||||
} |
@ -1,5 +1,5 @@ |
||||
import ./make-test-python.nix ({ pkgs, ... }: { |
||||
name = "grafana-mimir"; |
||||
name = "mimir"; |
||||
nodes = { |
||||
server = { ... }: { |
||||
environment.systemPackages = [ pkgs.jq ]; |
@ -1,135 +0,0 @@ |
||||
{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper |
||||
, # Patchelf dependencies: |
||||
alsa-lib, atomEnv, boehmgc, flac, libogg, libvorbis, libXScrnSaver, libGLU, libGL |
||||
, openssl, xorg, zlib |
||||
}: |
||||
|
||||
let |
||||
|
||||
version = "17.1"; |
||||
|
||||
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1kddisnvlk48jip6k59mw3wlkrl7rkck2lxpaghn0gfx02cvms5f" |
||||
else if stdenv.hostPlatform.system == "i686-cygwin" then "1izp42afrlh4yd322ax9w85ki388gnkqfqbw8dwnn4k3j7r5487z" |
||||
else throw "Unsupported system: ${stdenv.hostPlatform.system}"; |
||||
|
||||
urlBase = "https://github.com/Kode/KodeStudio/releases/download/v${version}/KodeStudio-"; |
||||
|
||||
urlStr = if stdenv.hostPlatform.system == "x86_64-linux" then urlBase + "linux64.tar.gz" |
||||
else if stdenv.hostPlatform.system == "i686-cygwin" then urlBase + "win32.zip" |
||||
else throw "Unsupported system: ${stdenv.hostPlatform.system}"; |
||||
|
||||
in |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "kodestudio"; |
||||
inherit version; |
||||
|
||||
src = fetchurl { |
||||
url = urlStr; |
||||
inherit sha256; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ makeWrapper ]; |
||||
buildInputs = [ libXScrnSaver ]; |
||||
|
||||
desktopItem = makeDesktopItem { |
||||
name = "kodestudio"; |
||||
exec = "kodestudio"; |
||||
icon = "kodestudio"; |
||||
comment = "Kode Studio is an IDE for Kha based on Visual Studio Code"; |
||||
desktopName = "Kode Studio"; |
||||
genericName = "Text Editor"; |
||||
categories = [ "GNOME" "GTK" "Utility" "TextEditor" "Development" ]; |
||||
}; |
||||
|
||||
sourceRoot = "."; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out |
||||
cp -r ./* $out |
||||
''; |
||||
|
||||
postFixup = lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' |
||||
# Patch Binaries |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath "$out:${atomEnv.libPath}" \ |
||||
$out/kodestudio |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath ".:${stdenv.cc.libc}/lib:${xorg.libXinerama}/lib:${xorg.libX11}/lib:${alsa-lib}/lib:${libGL}/lib:${libGLU}/lib:${lib.getLib openssl}/lib" \ |
||||
$out/resources/app/extensions/krom/Krom/linux/Krom |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath ".:${stdenv.cc.libc}/lib" \ |
||||
$out/resources/app/extensions/kha/Kha/Kore/Tools/krafix/krafix-linux64 |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath ".:${stdenv.cc.libc}/lib" \ |
||||
$out/resources/app/extensions/kha/Kha/Kore/Tools/kraffiti/kraffiti-linux64 |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" \ |
||||
$out/resources/app/extensions/kha/Kha/Tools/kravur/kravur-linux64 |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath ".:${stdenv.cc.libc}/lib:${zlib}/lib" \ |
||||
$out/resources/app/extensions/kha/Kha/Tools/haxe/haxe-linux64 |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath ".:${stdenv.cc.libc}/lib:${libvorbis}/lib:${libogg}/lib:${flac.out}/lib" \ |
||||
$out/resources/app/extensions/kha/Kha/Tools/oggenc/oggenc-linux64 |
||||
|
||||
# Patch Shared Objects |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/libnode.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib" $out/libffmpeg.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libv8_libplatform.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libicuuc.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libv8_libbase.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libv8.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/extensions/krom/Krom/linux/libicui18n.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${boehmgc}/lib" $out/resources/app/extensions/kha/Kha/Backends/Kore/khacpp/project/libs/nekoapi/bin/RPi/libneko.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${boehmgc}/lib" $out/resources/app/extensions/kha/Kha/Backends/Kore/khacpp/project/libs/nekoapi/bin/Linux64/libneko.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${boehmgc}/lib" $out/resources/app/extensions/kha/Kha/Backends/Kore/khacpp/project/libs/nekoapi/bin/Linux/libneko.so |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/pty.js/build/Release/pty.node |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/gc-signals/build/Release/gcsignals.node |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/gc-signals/build/Release/obj.target/gcsignals.node |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/oniguruma/build/Release/onig_scanner.node |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/resources/app/node_modules/oniguruma/build/Release/obj.target/onig_scanner.node |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${xorg.libX11}/lib" $out/resources/app/node_modules/native-keymap/build/Release/keymapping.node |
||||
patchelf --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${xorg.libX11}/lib" $out/resources/app/node_modules/native-keymap/build/Release/obj.target/keymapping.node |
||||
|
||||
# Rewrite VSCODE_PATH inside bin/kodestudio to $out |
||||
substituteInPlace $out/bin/kodestudio --replace "/usr/share/kodestudio" $out |
||||
|
||||
# Patch library calls that expects nix store files to be mode 644: |
||||
# A stat is made on srcFile (in the nix store), and its mode used |
||||
# for destFile, but it expects the mode to be read write, whereas |
||||
# all regular files in the nix store are made read only. |
||||
# (33188 is 100644 octal, the required mode) |
||||
substituteInPlace $out/resources/app/extensions/kha/Kha/Tools/khamake/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js --replace "stat.mode" "33188" |
||||
substituteInPlace $out/resources/app/extensions/kha/Kha/Kore/Tools/koremake/node_modules/fs-extra/lib/copy-sync/copy-file-sync.js --replace "stat.mode" "33188" |
||||
|
||||
# Wrap preload libXss |
||||
wrapProgram $out/bin/kodestudio \ |
||||
--prefix LD_PRELOAD : ${lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = '' |
||||
An IDE for Kha based on Visual Studio Code |
||||
''; |
||||
longDescription = '' |
||||
Kode Studio is an IDE for Kha based on Visual Studio Code. |
||||
|
||||
Kha and Kore are multimedia frameworks for Haxe and C++ respectively |
||||
(with JavaScript coming soon). Using Kha or Kore you can access all |
||||
hardware at the lowest possible level in a completely portable way. |
||||
''; |
||||
homepage = "http://kode.tech/"; |
||||
downloadPage = "https://github.com/Kode/KodeStudio/releases"; |
||||
license = licenses.mit; |
||||
maintainers = [ maintainers.patternspandemic ]; |
||||
platforms = [ "x86_64-linux" "i686-cygwin" ]; |
||||
}; |
||||
} |
@ -1,51 +0,0 @@ |
||||
{ lib, gcc10Stdenv, fetchhg, fetchurl, gtk2, glib, pkg-config, unzip, ncurses, zip }: |
||||
|
||||
gcc10Stdenv.mkDerivation rec { |
||||
version = "10.8"; |
||||
pname = "textadept"; |
||||
|
||||
nativeBuildInputs = [ pkg-config unzip ]; |
||||
buildInputs = [ |
||||
gtk2 ncurses glib zip |
||||
]; |
||||
|
||||
src = fetchhg { |
||||
url = "http://foicica.com/hg/textadept"; |
||||
rev = "textadept_${version}"; |
||||
sha256 = "sha256-dEZSx2tuHTWYhk9q5iGlrWTAvDvKaM8HaHwXcFcv33s="; |
||||
}; |
||||
|
||||
preConfigure = |
||||
lib.concatStringsSep "\n" (lib.mapAttrsToList (name: params: |
||||
"ln -s ${fetchurl params} $PWD/src/${name}" |
||||
) (import ./deps.nix)) + '' |
||||
|
||||
cd src |
||||
make deps |
||||
''; |
||||
|
||||
postBuild = '' |
||||
make curses |
||||
''; |
||||
|
||||
preInstall = '' |
||||
mkdir -p $out/share/applications |
||||
mkdir -p $out/share/pixmaps |
||||
''; |
||||
|
||||
postInstall = '' |
||||
make curses install PREFIX=$out MAKECMDGOALS=curses |
||||
''; |
||||
|
||||
makeFlags = [ |
||||
"PREFIX=$(out) WGET=true PIXMAPS_DIR=$(out)/share/pixmaps" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "An extensible text editor based on Scintilla with Lua scripting"; |
||||
homepage = "http://foicica.com/textadept"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ raskin mirrexagon ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
@ -1,42 +0,0 @@ |
||||
{ |
||||
"99fa62b828ee.zip" = { |
||||
url = "http://foicica.com/hg/scintilla/archive/99fa62b828ee.zip"; |
||||
sha256 = "sha256-QO4iGhx72CfB1/0Pp/Qab92qm98VZn/EkrHZGndoHVc="; |
||||
}; |
||||
"lua-5.3.5.tar.gz" = { |
||||
url = "http://www.lua.org/ftp/lua-5.3.5.tar.gz"; |
||||
sha256 = "1b2qn2rv96nmbm6zab4l877bd4zq7wpwm8drwjiy2ih4jqzysbhc"; |
||||
}; |
||||
"lpeg-1.0.2.tar.gz" = { |
||||
url = "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz"; |
||||
sha256 = "sha256-SNZldgUbbHg4j6rQm3BJMJMmRYj80PJY3aqxzdShX/4="; |
||||
}; |
||||
"v1_7_0_2.zip" = { |
||||
url = "https://github.com/keplerproject/luafilesystem/archive/v1_7_0_2.zip"; |
||||
sha256 = "sha256-kXSriR8dOStCpYeyr7c3+VZez4qGDS5aK/9FeFj1hHg="; |
||||
}; |
||||
"db67f8a489e8.zip" = { |
||||
url = "http://foicica.com/hg/gtdialog/archive/db67f8a489e8.zip"; |
||||
sha256 = "sha256-UIvjbDrg3jyz7t2tm4y1zzH/TG6Kqaz3LE5y2U6OHuM="; |
||||
}; |
||||
"cdk-5.0-20150928.tgz" = { |
||||
url = "http://invisible-mirror.net/archives/cdk/cdk-5.0-20150928.tgz"; |
||||
sha256 = "0j74l874y33i26y5kjg3pf1vswyjif8k93pqhi0iqykpbxfsg382"; |
||||
}; |
||||
"libtermkey-0.20.tar.gz" = { |
||||
url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.20.tar.gz"; |
||||
sha256 = "1xfj6lchhfljmbcl6dz8dpakppyy13nbl4ykxiv5x4dr9b4qf3bc"; |
||||
}; |
||||
"pdcurs36.zip" = { |
||||
url = "http://prdownloads.sourceforge.net/pdcurses/pdcurs36.zip"; |
||||
sha256 = "0y91zpygrxms7d1l5ksrz42bkvq8jd2xqlj5j7wgyxcl58chcw9b"; |
||||
}; |
||||
"bombay.zip" = { |
||||
url = "http://foicica.com/hg/bombay/archive/b25520cc76bb.zip"; |
||||
sha256 = "07spq7jmkfyq20gv67yffara3ln3ns2xi0k02m2mxdms3xm1q36h"; |
||||
}; |
||||
"cloc-1.60.pl" = { |
||||
url = "http://prdownloads.sourceforge.net/cloc/cloc-1.60.pl"; |
||||
sha256 = "0p504bi19va3dh274v7lb7giqrydwa5yyry60f7jpz84y6z71a2a"; |
||||
}; |
||||
} |
@ -1,72 +0,0 @@ |
||||
{ lib, stdenv, python27Packages, curaengine, makeDesktopItem, fetchFromGitHub }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "cura"; |
||||
version = "15.06.03"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "daid"; |
||||
repo = "Cura"; |
||||
rev = version; |
||||
sha256 = "sha256-o1cAi4Wi19WOijlRB9iYwNEpSNnmywUj5Bth8rRhqFA="; |
||||
}; |
||||
|
||||
desktopItem = makeDesktopItem { |
||||
name = "Cura"; |
||||
exec = "cura"; |
||||
icon = "cura"; |
||||
comment = "Cura"; |
||||
desktopName = "Cura"; |
||||
genericName = "3D printing host software"; |
||||
categories = [ "GNOME" "GTK" "Utility" ]; |
||||
}; |
||||
|
||||
python_deps = with python27Packages; [ pyopengl pyserial numpy wxPython30 power setuptools ]; |
||||
|
||||
pythonPath = python_deps; |
||||
|
||||
propagatedBuildInputs = python_deps; |
||||
|
||||
buildInputs = [ curaengine python27Packages.wrapPython ]; |
||||
|
||||
configurePhase = ""; |
||||
buildPhase = ""; |
||||
|
||||
patches = [ ./numpy-cast.patch ]; |
||||
|
||||
installPhase = '' |
||||
# Install Python code. |
||||
site_packages=$out/lib/python2.7/site-packages |
||||
mkdir -p $site_packages |
||||
cp -r Cura $site_packages/ |
||||
|
||||
# Install resources. |
||||
resources=$out/share/cura |
||||
mkdir -p $resources |
||||
cp -r resources/* $resources/ |
||||
sed -i 's|os.path.join(os.path.dirname(__file__), "../../resources")|"'$resources'"|g' $site_packages/Cura/util/resources.py |
||||
|
||||
# Install executable. |
||||
mkdir -p $out/bin |
||||
cp Cura/cura.py $out/bin/cura |
||||
chmod +x $out/bin/cura |
||||
sed -i 's|#!/usr/bin/python|#!/usr/bin/env python|' $out/bin/cura |
||||
wrapPythonPrograms |
||||
|
||||
# Make it find CuraEngine. |
||||
echo "def getEngineFilename(): return '${curaengine}/bin/CuraEngine'" >> $site_packages/Cura/util/sliceEngine.py |
||||
|
||||
# Install desktop item. |
||||
mkdir -p "$out"/share/applications |
||||
cp "$desktopItem"/share/applications/* "$out"/share/applications/ |
||||
mkdir -p "$out"/share/icons |
||||
ln -s "$resources/images/c.png" "$out"/share/icons/cura.png |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "3D printing host software"; |
||||
homepage = "https://github.com/daid/Cura"; |
||||
license = licenses.agpl3; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
@ -1,60 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, python27Packages, file }: |
||||
|
||||
let |
||||
inherit (python27Packages) python; |
||||
requirements = (import ./requirements.nix { |
||||
inherit lib fetchurl; |
||||
pythonPackages = python27Packages; |
||||
}); |
||||
|
||||
in |
||||
stdenv.mkDerivation rec { |
||||
pname = "salut-a-toi"; |
||||
version = "0.6.1"; |
||||
|
||||
src = fetchurl { |
||||
url = "ftp://ftp.goffi.org/sat/sat-${version}.tar.bz2"; |
||||
sha256 = "0kn9403n8fpzl0hsb9kkzicsmzq2fjl627l31yykbqzc4nsr780d"; |
||||
}; |
||||
|
||||
buildInputs = with python27Packages; |
||||
[ |
||||
python twisted urwid wxPython pygobject2 |
||||
dbus-python wrapPython setuptools file |
||||
pycrypto pyxdg |
||||
] ++ (with requirements; [ |
||||
pyfeed |
||||
wokkel |
||||
]); |
||||
|
||||
configurePhase = '' |
||||
sed -i "/use_setuptools/d" setup.py |
||||
sed -e "s@sys.prefix@'$out'@g" -i setup.py |
||||
sed -e "1aexport PATH=\"\$PATH\":\"$out/bin\":\"${python27Packages.twisted}/bin\"" -i src/sat.sh |
||||
sed -e "1aexport PYTHONPATH=\"\$PYTHONPATHPATH\":\"$PYTHONPATH\":"$out/${python.sitePackages}"" -i src/sat.sh |
||||
|
||||
echo 'import wokkel.muc' | python |
||||
''; |
||||
|
||||
buildPhase = '' |
||||
${python.interpreter} setup.py build |
||||
''; |
||||
|
||||
installPhase = '' |
||||
${python.interpreter} setup.py install --prefix="$out" |
||||
|
||||
for i in "$out/bin"/*; do |
||||
head -n 1 "$i" | grep -E '[/ ]python( |$)' && { |
||||
wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH:$out/${python.sitePackages}" |
||||
} || true |
||||
done |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "http://sat.goffi.org/"; |
||||
description = "A multi-frontend XMPP client"; |
||||
platforms = platforms.linux; |
||||
maintainers = [ maintainers.raskin ]; |
||||
license = licenses.gpl3Plus; |
||||
}; |
||||
} |
@ -1,67 +0,0 @@ |
||||
{ fetchurl |
||||
, lib |
||||
, pythonPackages |
||||
}: |
||||
|
||||
let |
||||
buildPythonPackage = pythonPackages.buildPythonPackage; |
||||
|
||||
xe = buildPythonPackage rec { |
||||
url = "http://www.blarg.net/%7Esteveha/xe-0.7.4.tar.gz"; |
||||
name = lib.nameFromURL url ".tar"; |
||||
src = fetchurl { |
||||
inherit url; |
||||
sha256 = "0v9878cl0y9cczdsr6xjy8v9l139lc23h4m5f86p4kpf2wlnpi42"; |
||||
}; |
||||
|
||||
# error: invalid command 'test' |
||||
doCheck = false; |
||||
|
||||
meta = { |
||||
homepage = "http://home.blarg.net/~steveha/xe.html"; |
||||
description = "XML elements"; |
||||
}; |
||||
}; |
||||
|
||||
in { |
||||
|
||||
pyfeed = (buildPythonPackage rec { |
||||
url = "http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz"; |
||||
|
||||
name = lib.nameFromURL url ".tar"; |
||||
|
||||
src = fetchurl { |
||||
inherit url; |
||||
sha256 = "1h4msq573m7wm46h3cqlx4rsn99f0l11rhdqgf50lv17j8a8vvy1"; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ xe ]; |
||||
|
||||
# error: invalid command 'test' |
||||
doCheck = false; |
||||
|
||||
meta = with lib; { |
||||
homepage = "http://home.blarg.net/~steveha/pyfeed.html"; |
||||
description = "Tools for syndication feeds"; |
||||
}; |
||||
|
||||
}); |
||||
|
||||
wokkel = buildPythonPackage (rec { |
||||
url = "http://wokkel.ik.nu/releases/0.7.0/wokkel-0.7.0.tar.gz"; |
||||
name = lib.nameFromURL url ".tar"; |
||||
src = fetchurl { |
||||
inherit url; |
||||
sha256 = "0rnshrzw8605x05mpd8ndrx3ri8h6cx713mp8sl4f04f4gcrz8ml"; |
||||
}; |
||||
|
||||
propagatedBuildInputs = with pythonPackages; [twisted python-dateutil]; |
||||
|
||||
meta = with lib; { |
||||
description = "Some (mainly XMPP-related) additions to twisted"; |
||||
homepage = "http://wokkel.ik.nu/"; |
||||
license = licenses.mit; |
||||
}; |
||||
}); |
||||
|
||||
} |
@ -1,40 +0,0 @@ |
||||
{ lib, stdenv, fetchFromGitHub, python2, unzip, tor }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "torchat"; |
||||
version = "0.9.9.553"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "prof7bit"; |
||||
repo = "TorChat"; |
||||
rev = version; |
||||
sha256 = "2LHG9qxZDo5rV6wsputdRo2Y1aHs+irMwt1ucFnXQE0="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ unzip ]; |
||||
buildInputs = with python2.pkgs; [ python wxPython wrapPython ]; |
||||
pythonPath = with python2.pkgs; [ wxPython ]; |
||||
|
||||
preConfigure = "cd torchat/src; rm portable.txt"; |
||||
|
||||
installPhase = '' |
||||
substituteInPlace "Tor/tor.sh" --replace "tor -f" "${tor}/bin/tor -f" |
||||
|
||||
wrapPythonPrograms |
||||
|
||||
mkdir -p $out/lib/torchat |
||||
cp -rf * $out/lib/torchat |
||||
makeWrapper ${python2}/bin/python $out/bin/torchat \ |
||||
--set PYTHONPATH $out/lib/torchat:$program_PYTHONPATH \ |
||||
--chdir "$out/lib/torchat" \ |
||||
--add-flags "-O $out/lib/torchat/torchat.py" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/prof7bit/TorChat"; |
||||
description = "Instant messaging application on top of the Tor network and it's location hidden services"; |
||||
license = licenses.gpl3; |
||||
maintainers = [ ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
} |
@ -1,6 +1,6 @@ |
||||
{ |
||||
"commit": "1da63d5bfb88cd1e920fefd1b55650c78edc5539", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/1da63d5bfb88cd1e920fefd1b55650c78edc5539.tar.gz", |
||||
"sha256": "1n8qv8ajfwrj73f81m2zj81jyjx1jxxhjljwp8gch2aq8piz74g6", |
||||
"msg": "Update from Hackage at 2022-05-29T17:05:02Z" |
||||
"commit": "a4be9679c308459b390768e6195f3f08ae5366db", |
||||
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/a4be9679c308459b390768e6195f3f08ae5366db.tar.gz", |
||||
"sha256": "09pr3ag0k1wjiih36p902gcpygxg8f7wqpr5g8j7ka851g0gckqa", |
||||
"msg": "Update from Hackage at 2022-06-04T09:01:11Z" |
||||
} |
||||
|
@ -0,0 +1,43 @@ |
||||
{ lib |
||||
, pkgs |
||||
, stdenv |
||||
, fetchFromGitHub |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "gmqcc"; |
||||
version = "unstable-2021-07-09"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "graphitemaster"; |
||||
repo = "gmqcc"; |
||||
rev = "297eab9e5e2c9cc4f41201b68821593a5cf9a725"; |
||||
sha256 = "1hl2qn7402ia03kjkblj4q4wfypxkil99sivsyk2vrnwwpdp4nzx"; |
||||
}; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
|
||||
mkdir -p $out/bin |
||||
install -m755 gmqcc $out/bin |
||||
|
||||
runHook postInstall |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://graphitemaster.github.io/gmqcc/"; |
||||
description = "A modern QuakeC compiler"; |
||||
longDescription = '' |
||||
For an enduring period of time the options for a decent compiler for |
||||
the Quake C programming language were confined to a specific compiler |
||||
known as QCC. Attempts were made to extend and improve upon the design |
||||
of QCC, but many foreseen the consequences of building on a broken |
||||
foundation. The solution was obvious, a new compiler; one born from |
||||
the NIH realm of sarcastic wit. |
||||
We welcome you. You won't find a better Quake C compiler. |
||||
''; |
||||
license = lib.licenses.mit; |
||||
maintainers = with lib.maintainers; [ necrophcodr ]; |
||||
platforms = platforms.linux; |
||||
}; |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,16 @@ |
||||
{ lib, buildDunePackage, posix-base, posix-types, unix-errno }: |
||||
|
||||
buildDunePackage { |
||||
pname = "posix-time2"; |
||||
|
||||
inherit (posix-base) version src; |
||||
|
||||
propagatedBuildInputs = [ posix-base posix-types unix-errno ]; |
||||
|
||||
doCheck = true; |
||||
|
||||
meta = posix-base.meta // { |
||||
description = "posix-time2 provides the types and bindings for posix time APIs"; |
||||
maintainers = with lib.maintainers; [ dandellion ]; |
||||
}; |
||||
} |
@ -0,0 +1,22 @@ |
||||
{ lib, buildDunePackage, fetchurl, ctypes, integers, result }: |
||||
|
||||
buildDunePackage rec { |
||||
pname = "unix-errno"; |
||||
version = "0.6.1"; |
||||
|
||||
minimalOCamlVersion = "4.03.0"; # Specified to be 4.01.0, but it's actually 4.03 |
||||
|
||||
src = fetchurl { |
||||
url = "https://github.com/xapi-project/ocaml-unix-errno/releases/download/${version}/unix-errno-${version}.tbz"; |
||||
sha256 = "sha256-jZqtHwUKTffjuOP2jdKKQRtEOBKyclhfeiPO96hEj4c="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ ctypes integers result ]; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/xapi-project/ocaml-unix-errno"; # This is the repo used in the opam package |
||||
description = "Unix errno types, maps, and support for OCaml"; |
||||
license = with licenses; [ isc lgpl21Only ]; # All the files indicate ISC, but there's an LGPL LICENSE file |
||||
maintainers = with maintainers; [ dandellion ]; |
||||
}; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue