Project import generated by Copybara.

GitOrigin-RevId: 6b1057b452c55bb3b463f0d7055bc4ec3fd1f381
This commit is contained in:
Default email 2021-02-17 18:02:09 +01:00
parent 5b53d9a9dd
commit d419639f9c
305 changed files with 4853 additions and 3243 deletions

View file

@ -0,0 +1,64 @@
# Eclipse {#sec-eclipse}
The Nix expressions related to the Eclipse platform and IDE are in [`pkgs/applications/editors/eclipse`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse).
Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
```ShellSession
$ nix-env -f '<nixpkgs>' -qaP -A eclipses --description
```
Once an Eclipse variant is installed it can be run using the `eclipse` command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an _Eclipse environment_. This type of environment is created using the function `eclipseWithPlugins` found inside the `nixpkgs.eclipses` attribute set. This function takes as argument `{ eclipse, plugins ? [], jvmArgs ? [] }` where `eclipse` is a one of the Eclipse packages described above, `plugins` is a list of plugin derivations, and `jvmArgs` is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add
```nix
packageOverrides = pkgs: {
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [ "-Xmx2048m" ];
plugins = [ plugins.color-theme ];
};
}
```
to your Nixpkgs configuration (`~/.config/nixpkgs/config.nix`) and install it by running `nix-env -f '<nixpkgs>' -iA myEclipse` and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using `eclipseWithPlugins` by running
```ShellSession
$ nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description
```
If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the `buildEclipseUpdateSite` and `buildEclipsePlugin` functions found in the `nixpkgs.eclipses.plugins` attribute set. Use the `buildEclipseUpdateSite` function to install a plugin distributed as an Eclipse update site. This function takes `{ name, src }` as argument where `src` indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the `buildEclipsePlugin` function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument `{ name, srcFeature, srcPlugin }` where `srcFeature` and `srcPlugin` are the feature and plugin JARs, respectively.
Expanding the previous example with two plugins using the above functions we have
```nix
packageOverrides = pkgs: {
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [ "-Xmx2048m" ];
plugins = [
plugins.color-theme
(plugins.buildEclipsePlugin {
name = "myplugin1-1.0";
srcFeature = fetchurl {
url = "http://…/features/myplugin1.jar";
sha256 = "123…";
};
srcPlugin = fetchurl {
url = "http://…/plugins/myplugin1.jar";
sha256 = "123…";
};
});
(plugins.buildEclipseUpdateSite {
name = "myplugin2-1.0";
src = fetchurl {
stripRoot = false;
url = "http://…/myplugin2.zip";
sha256 = "123…";
};
});
];
};
}
```

View file

@ -1,72 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-eclipse">
<title>Eclipse</title>
<para>
The Nix expressions related to the Eclipse platform and IDE are in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse"><filename>pkgs/applications/editors/eclipse</filename></link>.
</para>
<para>
Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
<screen>
<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses --description
</screen>
Once an Eclipse variant is installed it can be run using the <command>eclipse</command> command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
</para>
<para>
If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an <emphasis>Eclipse environment</emphasis>. This type of environment is created using the function <varname>eclipseWithPlugins</varname> found inside the <varname>nixpkgs.eclipses</varname> attribute set. This function takes as argument <literal>{ eclipse, plugins ? [], jvmArgs ? [] }</literal> where <varname>eclipse</varname> is a one of the Eclipse packages described above, <varname>plugins</varname> is a list of plugin derivations, and <varname>jvmArgs</varname> is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add
<screen>
packageOverrides = pkgs: {
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [ "-Xmx2048m" ];
plugins = [ plugins.color-theme ];
};
}
</screen>
to your Nixpkgs configuration (<filename>~/.config/nixpkgs/config.nix</filename>) and install it by running <command>nix-env -f '&lt;nixpkgs&gt;' -iA myEclipse</command> and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using <varname>eclipseWithPlugins</varname> by running
<screen>
<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses.plugins --description
</screen>
</para>
<para>
If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the <varname>buildEclipseUpdateSite</varname> and <varname>buildEclipsePlugin</varname> functions found in the <varname>nixpkgs.eclipses.plugins</varname> attribute set. Use the <varname>buildEclipseUpdateSite</varname> function to install a plugin distributed as an Eclipse update site. This function takes <literal>{ name, src }</literal> as argument where <literal>src</literal> indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the <varname>buildEclipsePlugin</varname> function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument <literal>{ name, srcFeature, srcPlugin }</literal> where <literal>srcFeature</literal> and <literal>srcPlugin</literal> are the feature and plugin JARs, respectively.
</para>
<para>
Expanding the previous example with two plugins using the above functions we have
<screen>
packageOverrides = pkgs: {
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [ "-Xmx2048m" ];
plugins = [
plugins.color-theme
(plugins.buildEclipsePlugin {
name = "myplugin1-1.0";
srcFeature = fetchurl {
url = "http://…/features/myplugin1.jar";
sha256 = "123…";
};
srcPlugin = fetchurl {
url = "http://…/plugins/myplugin1.jar";
sha256 = "123…";
};
});
(plugins.buildEclipseUpdateSite {
name = "myplugin2-1.0";
src = fetchurl {
stripRoot = false;
url = "http://…/myplugin2.zip";
sha256 = "123…";
};
});
];
};
}
</screen>
</para>
</section>

View file

@ -7,7 +7,7 @@
</para>
<xi:include href="citrix.xml" />
<xi:include href="dlib.xml" />
<xi:include href="eclipse.xml" />
<xi:include href="eclipse.section.xml" />
<xi:include href="elm.section.xml" />
<xi:include href="emacs.section.xml" />
<xi:include href="firefox.section.xml" />

View file

@ -768,6 +768,12 @@
githubId = 3965744;
name = "Arthur Lee";
};
arthurteisseire = {
email = "arthurteisseire33@gmail.com";
github = "arthurteisseire";
githubId = 37193992;
name = "Arthur Teisseire";
};
arturcygan = {
email = "arczicygan@gmail.com";
github = "arcz";
@ -3499,6 +3505,12 @@
githubId = 6893840;
name = "Yacine Hmito";
};
graham33 = {
email = "graham@grahambennett.org";
github = "graham33";
githubId = 10908649;
name = "Graham Bennett";
};
grahamc = {
email = "graham@grahamc.com";
github = "grahamc";
@ -3581,6 +3593,12 @@
githubId = 443978;
name = "Gabriel Volpe";
};
gytis-ivaskevicius = {
name = "Gytis Ivaskevicius";
email = "me@gytis.io";
github = "gytis-ivaskevicius";
githubId = 23264966;
};
hakuch = {
email = "hakuch@gmail.com";
github = "hakuch";
@ -9363,6 +9381,16 @@
githubId = 1391883;
name = "Tom Hall";
};
Thunderbottom = {
email = "chinmaydpai@gmail.com";
github = "Thunderbottom";
githubId = 11243138;
name = "Chinmay D. Pai";
keys = [{
longkeyid = "rsa4096/0x75507BE256F40CED";
fingerprint = "7F3E EEAA EE66 93CC 8782 042A 7550 7BE2 56F4 0CED";
}];
};
tiagolobocastro = {
email = "tiagolobocastro@gmail.com";
github = "tiagolobocastro";

View file

@ -585,6 +585,22 @@ EOF
return $config;
}
sub generateXserverConfig {
my $xserverEnabled = "@xserverEnabled@";
my $config = "";
if ($xserverEnabled eq "1") {
$config = <<EOF;
# Enable the X11 windowing system.
services.xserver.enable = true;
EOF
} else {
$config = <<EOF;
# Enable the X11 windowing system.
# services.xserver.enable = true;
EOF
}
}
if ($showHardwareConfig) {
print STDOUT $hwConfig;
@ -630,6 +646,8 @@ EOF
my $networkingDhcpConfig = generateNetworkingDhcpConfig();
my $xserverConfig = generateXserverConfig();
(my $desktopConfiguration = <<EOF)=~s/^/ /gm;
@desktopConfiguration@
EOF

View file

@ -36,6 +36,7 @@ let
path = lib.optionals (lib.elem "btrfs" config.boot.supportedFilesystems) [ pkgs.btrfs-progs ];
perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix}";
inherit (config.system.nixos-generate-config) configuration desktopConfiguration;
xserverEnabled = config.services.xserver.enable;
};
nixos-option =
@ -87,8 +88,8 @@ in
desktopConfiguration = mkOption {
internal = true;
type = types.str;
default = "";
type = types.listOf types.lines;
default = [];
description = ''
Text to preseed the desktop configuration that <literal>nixos-generate-config</literal>
saves to <literal>/etc/nixos/configuration.nix</literal>.
@ -136,6 +137,8 @@ in
# keyMap = "us";
# };
$xserverConfig
$desktopConfiguration
# Configure keymap in X11
# services.xserver.layout = "us";

View file

@ -321,7 +321,8 @@
./services/desktops/gsignond.nix
./services/desktops/gvfs.nix
./services/desktops/malcontent.nix
./services/desktops/pipewire.nix
./services/desktops/pipewire/pipewire.nix
./services/desktops/pipewire/pipewire-media-session.nix
./services/desktops/gnome3/at-spi2-core.nix
./services/desktops/gnome3/chrome-gnome-shell.nix
./services/desktops/gnome3/evolution-data-server.nix

View file

@ -1,183 +0,0 @@
# pipewire service.
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.pipewire;
enable32BitAlsaPlugins = cfg.alsa.support32Bit
&& pkgs.stdenv.isx86_64
&& pkgs.pkgsi686Linux.pipewire != null;
# The package doesn't output to $out/lib/pipewire directly so that the
# overlays can use the outputs to replace the originals in FHS environments.
#
# This doesn't work in general because of missing development information.
jack-libs = pkgs.runCommand "jack-libs" {} ''
mkdir -p "$out/lib"
ln -s "${cfg.package.jack}/lib" "$out/lib/pipewire"
'';
in {
meta = {
maintainers = teams.freedesktop.members;
};
###### interface
options = {
services.pipewire = {
enable = mkEnableOption "pipewire service";
package = mkOption {
type = types.package;
default = pkgs.pipewire;
defaultText = "pkgs.pipewire";
example = literalExample "pkgs.pipewire";
description = ''
The pipewire derivation to use.
'';
};
socketActivation = mkOption {
default = true;
type = types.bool;
description = ''
Automatically run pipewire when connections are made to the pipewire socket.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Literal string to append to /etc/pipewire/pipewire.conf.
'';
};
sessionManager = mkOption {
type = types.nullOr types.string;
default = null;
example = literalExample ''"''${pipewire}/bin/pipewire-media-session"'';
description = ''
Path to the pipewire session manager executable.
'';
};
sessionManagerArguments = mkOption {
type = types.listOf types.string;
default = [];
example = literalExample ''[ "-p" "bluez5.msbc-support=true" ]'';
description = ''
Arguments passed to the pipewire session manager.
'';
};
alsa = {
enable = mkEnableOption "ALSA support";
support32Bit = mkEnableOption "32-bit ALSA support on 64-bit systems";
};
jack = {
enable = mkEnableOption "JACK audio emulation";
};
pulse = {
enable = mkEnableOption "PulseAudio server emulation";
};
};
};
###### implementation
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable;
message = "PipeWire based PulseAudio server emulation replaces PulseAudio. This option requires `hardware.pulseaudio.enable` to be set to false";
}
{
assertion = cfg.jack.enable -> !config.services.jack.jackd.enable;
message = "PipeWire based JACK emulation doesn't use the JACK service. This option requires `services.jack.jackd.enable` to be set to false";
}
];
services.pipewire.sessionManager = mkDefault "${cfg.package}/bin/pipewire-media-session";
environment.systemPackages = [ cfg.package ]
++ lib.optional cfg.jack.enable jack-libs;
systemd.packages = [ cfg.package ]
++ lib.optional cfg.pulse.enable cfg.package.pulse;
# PipeWire depends on DBUS but doesn't list it. Without this booting
# into a terminal results in the service crashing with an error.
systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
systemd.user.sockets.pipewire-pulse.wantedBy = lib.mkIf (cfg.socketActivation && cfg.pulse.enable) ["sockets.target"];
systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
services.udev.packages = [ cfg.package ];
# If any paths are updated here they must also be updated in the package test.
environment.etc."alsa/conf.d/49-pipewire-modules.conf" = mkIf cfg.alsa.enable {
text = ''
pcm_type.pipewire {
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;
${optionalString enable32BitAlsaPlugins
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;"}
}
ctl_type.pipewire {
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;
${optionalString enable32BitAlsaPlugins
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;"}
}
'';
};
environment.etc."alsa/conf.d/50-pipewire.conf" = mkIf cfg.alsa.enable {
source = "${cfg.package}/share/alsa/alsa.conf.d/50-pipewire.conf";
};
environment.etc."alsa/conf.d/99-pipewire-default.conf" = mkIf cfg.alsa.enable {
source = "${cfg.package}/share/alsa/alsa.conf.d/99-pipewire-default.conf";
};
environment.sessionVariables.LD_LIBRARY_PATH =
lib.optional cfg.jack.enable "/run/current-system/sw/lib/pipewire";
environment.etc."pipewire/pipewire.conf" = {
# Adapted from src/daemon/pipewire.conf.in
text = ''
set-prop link.max-buffers 16 # version < 3 clients can't handle more
add-spa-lib audio.convert* audioconvert/libspa-audioconvert
add-spa-lib api.alsa.* alsa/libspa-alsa
add-spa-lib api.v4l2.* v4l2/libspa-v4l2
add-spa-lib api.libcamera.* libcamera/libspa-libcamera
add-spa-lib api.bluez5.* bluez5/libspa-bluez5
add-spa-lib api.vulkan.* vulkan/libspa-vulkan
add-spa-lib api.jack.* jack/libspa-jack
add-spa-lib support.* support/libspa-support
load-module libpipewire-module-rtkit # rt.prio=20 rt.time.soft=200000 rt.time.hard=200000
load-module libpipewire-module-protocol-native
load-module libpipewire-module-profiler
load-module libpipewire-module-metadata
load-module libpipewire-module-spa-device-factory
load-module libpipewire-module-spa-node-factory
load-module libpipewire-module-client-node
load-module libpipewire-module-client-device
load-module libpipewire-module-portal
load-module libpipewire-module-access
load-module libpipewire-module-adapter
load-module libpipewire-module-link-factory
load-module libpipewire-module-session-manager
create-object spa-node-factory factory.name=support.node.driver node.name=Dummy priority.driver=8000
exec ${cfg.sessionManager} ${lib.concatStringsSep " " cfg.sessionManagerArguments}
${cfg.extraConfig}
'';
};
environment.etc."pipewire/media-session.d/with-alsa" = mkIf cfg.alsa.enable { text = ""; };
environment.etc."pipewire/media-session.d/with-pulseaudio" = mkIf cfg.pulse.enable { text = ""; };
environment.etc."pipewire/media-session.d/with-jack" = mkIf cfg.jack.enable { text = ""; };
};
}

View file

@ -0,0 +1,340 @@
# pipewire example session manager.
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.pipewire.media-session;
enable32BitAlsaPlugins = cfg.alsa.support32Bit
&& pkgs.stdenv.isx86_64
&& pkgs.pkgsi686Linux.pipewire != null;
# Helpers for generating the pipewire JSON config file
mkSPAValueString = v:
if builtins.isList v then "[${lib.concatMapStringsSep " " mkSPAValueString v}]"
else if lib.types.attrs.check v then
"{${lib.concatStringsSep " " (mkSPAKeyValue v)}}"
else lib.generators.mkValueStringDefault { } v;
mkSPAKeyValue = attrs: map (def: def.content) (
lib.sortProperties
(
lib.mapAttrsToList
(k: v: lib.mkOrder (v._priority or 1000) "${lib.escape [ "=" ] k} = ${mkSPAValueString (v._content or v)}")
attrs
)
);
toSPAJSON = attrs: lib.concatStringsSep "\n" (mkSPAKeyValue attrs);
in {
meta = {
maintainers = teams.freedesktop.members;
};
###### interface
options = {
services.pipewire.media-session = {
enable = mkOption {
type = types.bool;
default = true;
description = "Example pipewire session manager";
};
package = mkOption {
type = types.package;
default = pkgs.pipewire.mediaSession;
example = literalExample "pkgs.pipewire.mediaSession";
description = ''
The pipewire-media-session derivation to use.
'';
};
config = mkOption {
type = types.attrs;
description = ''
Configuration for the media session core.
'';
default = {
# media-session config file
properties = {
# Properties to configure the session and some
# modules
#mem.mlock-all = false;
#context.profile.modules = "default,rtkit";
};
spa-libs = {
# Mapping from factory name to library.
"api.bluez5.*" = "bluez5/libspa-bluez5";
"api.alsa.*" = "alsa/libspa-alsa";
"api.v4l2.*" = "v4l2/libspa-v4l2";
"api.libcamera.*" = "libcamera/libspa-libcamera";
};
modules = {
# These are the modules that are enabled when a file with
# the key name is found in the media-session.d config directory.
# the default bundle is always enabled.
default = [
"flatpak" # manages flatpak access
"portal" # manage portal permissions
"v4l2" # video for linux udev detection
#"libcamera" # libcamera udev detection
"suspend-node" # suspend inactive nodes
"policy-node" # configure and link nodes
#"metadata" # export metadata API
#"default-nodes" # restore default nodes
#"default-profile" # restore default profiles
#"default-routes" # restore default route
#"streams-follow-default" # move streams when default changes
#"alsa-seq" # alsa seq midi support
#"alsa-monitor" # alsa udev detection
#"bluez5" # bluetooth support
#"restore-stream" # restore stream settings
];
"with-audio" = [
"metadata"
"default-nodes"
"default-profile"
"default-routes"
"alsa-seq"
"alsa-monitor"
];
"with-alsa" = [
"with-audio"
];
"with-jack" = [
"with-audio"
];
"with-pulseaudio" = [
"with-audio"
"bluez5"
"restore-stream"
"streams-follow-default"
];
};
};
};
alsaMonitorConfig = mkOption {
type = types.attrs;
description = ''
Configuration for the alsa monitor.
'';
default = {
# alsa-monitor config file
properties = {
#alsa.jack-device = true
};
rules = [
# an array of matches/actions to evaluate
{
# rules for matching a device or node. It is an array of
# properties that all need to match the regexp. If any of the
# matches work, the actions are executed for the object.
matches = [
{
# this matches all cards
device.name = "~alsa_card.*";
}
];
actions = {
# actions can update properties on the matched object.
update-props = {
api.alsa.use-acp = true;
#api.alsa.use-ucm = true;
#api.alsa.soft-mixer = false;
#api.alsa.ignore-dB = false;
#device.profile-set = "profileset-name";
#device.profile = "default profile name";
api.acp.auto-profile = false;
api.acp.auto-port = false;
#device.nick = "My Device";
};
};
}
{
matches = [
{
# matches all sinks
node.name = "~alsa_input.*";
}
{
# matches all sources
node.name = "~alsa_output.*";
}
];
actions = {
update-props = {
#node.nick = "My Node";
#node.nick = null;
#priority.driver = 100;
#priority.session = 100;
#node.pause-on-idle = false;
#resample.quality = 4;
#channelmix.normalize = false;
#channelmix.mix-lfe = false;
#audio.channels = 2;
#audio.format = "S16LE";
#audio.rate = 44100;
#audio.position = "FL,FR";
#api.alsa.period-size = 1024;
#api.alsa.headroom = 0;
#api.alsa.disable-mmap = false;
#api.alsa.disable-batch = false;
};
};
}
];
};
};
bluezMonitorConfig = mkOption {
type = types.attrs;
description = ''
Configuration for the bluez5 monitor.
'';
default = {
# bluez-monitor config file
properties = {
# msbc is not expected to work on all headset + adapter combinations.
#bluez5.msbc-support = true;
#bluez5.sbc-xq-support = true;
# Enabled headset roles (default: [ hsp_hs hfp_ag ]), this
# property only applies to native backend. Currently some headsets
# (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag
# enabled, disable either hsp_ag or hfp_ag to work around it.
#
# Supported headset roles: hsp_hs (HSP Headset),
# hsp_ag (HSP Audio Gateway),
# hfp_ag (HFP Audio Gateway)
#bluez5.headset-roles = [ "hsp_hs" "hsp_ag" "hfp_ag" ];
# Enabled A2DP codecs (default: all)
#bluez5.codecs = [ "sbc" "aac" "ldac" "aptx" "aptx_hd" ];
};
rules = [
# an array of matches/actions to evaluate
{
# rules for matching a device or node. It is an array of
# properties that all need to match the regexp. If any of the
# matches work, the actions are executed for the object.
matches = [
{
# this matches all cards
device.name = "~bluez_card.*";
}
];
actions = {
# actions can update properties on the matched object.
update-props = {
#device.nick = "My Device";
};
};
}
{
matches = [
{
# matches all sinks
node.name = "~bluez_input.*";
}
{
# matches all sources
node.name = "~bluez_output.*";
}
];
actions = {
update-props = {
#node.nick = "My Node"
#node.nick = null;
#priority.driver = 100;
#priority.session = 100;
#node.pause-on-idle = false;
#resample.quality = 4;
#channelmix.normalize = false;
#channelmix.mix-lfe = false;
};
};
}
];
};
};
v4l2MonitorConfig = mkOption {
type = types.attrs;
description = ''
Configuration for the V4L2 monitor.
'';
default = {
# v4l2-monitor config file
properties = {
};
rules = [
# an array of matches/actions to evaluate
{
# rules for matching a device or node. It is an array of
# properties that all need to match the regexp. If any of the
# matches work, the actions are executed for the object.
matches = [
{
# this matches all devices
device.name = "~v4l2_device.*";
}
];
actions = {
# actions can update properties on the matched object.
update-props = {
#device.nick = "My Device";
};
};
}
{
matches = [
{
# matches all sinks
node.name = "~v4l2_input.*";
}
{
# matches all sources
node.name = "~v4l2_output.*";
}
];
actions = {
update-props = {
#node.nick = "My Node";
#node.nick = null;
#priority.driver = 100;
#priority.session = 100;
#node.pause-on-idle = true;
};
};
}
];
};
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.pipewire.sessionManagerExecutable = "${cfg.package}/bin/pipewire-media-session";
environment.etc."pipewire/media-session.d/media-session.conf" = { text = toSPAJSON cfg.config; };
environment.etc."pipewire/media-session.d/v4l2-monitor.conf" = { text = toSPAJSON cfg.v4l2MonitorConfig; };
environment.etc."pipewire/media-session.d/with-alsa" = mkIf config.services.pipewire.alsa.enable { text = ""; };
environment.etc."pipewire/media-session.d/alsa-monitor.conf" = mkIf config.services.pipewire.alsa.enable { text = toSPAJSON cfg.alsaMonitorConfig; };
environment.etc."pipewire/media-session.d/with-pulseaudio" = mkIf config.services.pipewire.pulse.enable { text = ""; };
environment.etc."pipewire/media-session.d/bluez-monitor.conf" = mkIf config.services.pipewire.pulse.enable { text = toSPAJSON cfg.bluezMonitorConfig; };
environment.etc."pipewire/media-session.d/with-jack" = mkIf config.services.pipewire.jack.enable { text = ""; };
};
}

View file

@ -0,0 +1,265 @@
# pipewire service.
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.pipewire;
enable32BitAlsaPlugins = cfg.alsa.support32Bit
&& pkgs.stdenv.isx86_64
&& pkgs.pkgsi686Linux.pipewire != null;
# The package doesn't output to $out/lib/pipewire directly so that the
# overlays can use the outputs to replace the originals in FHS environments.
#
# This doesn't work in general because of missing development information.
jack-libs = pkgs.runCommand "jack-libs" {} ''
mkdir -p "$out/lib"
ln -s "${cfg.package.jack}/lib" "$out/lib/pipewire"
'';
# Helpers for generating the pipewire JSON config file
mkSPAValueString = v:
if builtins.isList v then "[${lib.concatMapStringsSep " " mkSPAValueString v}]"
else if lib.types.attrs.check v then
"{${lib.concatStringsSep " " (mkSPAKeyValue v)}}"
else lib.generators.mkValueStringDefault { } v;
mkSPAKeyValue = attrs: map (def: def.content) (
lib.sortProperties
(
lib.mapAttrsToList
(k: v: lib.mkOrder (v._priority or 1000) "${lib.escape [ "=" ] k} = ${mkSPAValueString (v._content or v)}")
attrs
)
);
toSPAJSON = attrs: lib.concatStringsSep "\n" (mkSPAKeyValue attrs);
in {
meta = {
maintainers = teams.freedesktop.members;
};
###### interface
options = {
services.pipewire = {
enable = mkEnableOption "pipewire service";
package = mkOption {
type = types.package;
default = pkgs.pipewire;
defaultText = "pkgs.pipewire";
example = literalExample "pkgs.pipewire";
description = ''
The pipewire derivation to use.
'';
};
socketActivation = mkOption {
default = true;
type = types.bool;
description = ''
Automatically run pipewire when connections are made to the pipewire socket.
'';
};
config = mkOption {
type = types.attrs;
description = ''
Configuration for the pipewire daemon.
'';
default = {
properties = {
## set-prop is used to configure properties in the system
#
# "library.name.system" = "support/libspa-support";
# "context.data-loop.library.name.system" = "support/libspa-support";
"link.max-buffers" = 16; # version < 3 clients can't handle more than 16
#"mem.allow-mlock" = false;
#"mem.mlock-all" = true;
## https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/pipewire/pipewire.h#L93
#"log.level" = 2; # 5 is trace, which is verbose as hell, default is 2 which is warnings, 4 is debug output, 3 is info
## Properties for the DSP configuration
#
#"default.clock.rate" = 48000;
#"default.clock.quantum" = 1024;
#"default.clock.min-quantum" = 32;
#"default.clock.max-quantum" = 8192;
#"default.video.width" = 640;
#"default.video.height" = 480;
#"default.video.rate.num" = 25;
#"default.video.rate.denom" = 1;
};
spa-libs = {
## add-spa-lib <factory-name regex> <library-name>
#
# used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
"audio.convert*" = "audioconvert/libspa-audioconvert";
"api.alsa.*" = "alsa/libspa-alsa";
"api.v4l2.*" = "v4l2/libspa-v4l2";
"api.libcamera.*" = "libcamera/libspa-libcamera";
"api.bluez5.*" = "bluez5/libspa-bluez5";
"api.vulkan.*" = "vulkan/libspa-vulkan";
"api.jack.*" = "jack/libspa-jack";
"support.*" = "support/libspa-support";
# "videotestsrc" = "videotestsrc/libspa-videotestsrc";
# "audiotestsrc" = "audiotestsrc/libspa-audiotestsrc";
};
modules = {
## <module-name> = { [args = "<key>=<value> ..."]
# [flags = ifexists] }
# [flags = [ifexists]|[nofail]}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignoed when it is not found.
# If nofail is given, module initialization failures are ignored.
#
libpipewire-module-rtkit = {
args = {
#rt.prio = 20;
#rt.time.soft = 200000;
#rt.time.hard = 200000;
#nice.level = -11;
};
flags = "ifexists|nofail";
};
libpipewire-module-protocol-native = { _priority = -100; _content = "null"; };
libpipewire-module-profiler = "null";
libpipewire-module-metadata = "null";
libpipewire-module-spa-device-factory = "null";
libpipewire-module-spa-node-factory = "null";
libpipewire-module-client-node = "null";
libpipewire-module-client-device = "null";
libpipewire-module-portal = "null";
libpipewire-module-access = {
args.access = {
allowed = ["${builtins.unsafeDiscardStringContext cfg.sessionManagerExecutable}"];
rejected = [];
restricted = [];
force = "flatpak";
};
};
libpipewire-module-adapter = "null";
libpipewire-module-link-factory = "null";
libpipewire-module-session-manager = "null";
};
objects = {
## create-object [-nofail] <factory-name> [<key>=<value> ...]
#
# Creates an object from a PipeWire factory with the given parameters.
# If -nofail is given, errors are ignored (and no object is created)
#
};
exec = {
## exec <program-name>
#
# Execute the given program. This is usually used to start the
# session manager. run the session manager with -h for options
#
"${builtins.unsafeDiscardStringContext cfg.sessionManagerExecutable}" = { args = "\"${lib.concatStringsSep " " cfg.sessionManagerArguments}\""; };
};
};
};
sessionManagerExecutable = mkOption {
type = types.str;
default = "";
example = literalExample ''${pkgs.pipewire.mediaSession}/bin/pipewire-media-session'';
description = ''
Path to the session manager executable.
'';
};
sessionManagerArguments = mkOption {
type = types.listOf types.str;
default = [];
example = literalExample ''["-p" "bluez5.msbc-support=true"]'';
description = ''
Arguments passed to the pipewire session manager.
'';
};
alsa = {
enable = mkEnableOption "ALSA support";
support32Bit = mkEnableOption "32-bit ALSA support on 64-bit systems";
};
jack = {
enable = mkEnableOption "JACK audio emulation";
};
pulse = {
enable = mkEnableOption "PulseAudio server emulation";
};
};
};
###### implementation
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable;
message = "PipeWire based PulseAudio server emulation replaces PulseAudio. This option requires `hardware.pulseaudio.enable` to be set to false";
}
{
assertion = cfg.jack.enable -> !config.services.jack.jackd.enable;
message = "PipeWire based JACK emulation doesn't use the JACK service. This option requires `services.jack.jackd.enable` to be set to false";
}
];
environment.systemPackages = [ cfg.package ]
++ lib.optional cfg.jack.enable jack-libs;
systemd.packages = [ cfg.package ]
++ lib.optional cfg.pulse.enable cfg.package.pulse;
# PipeWire depends on DBUS but doesn't list it. Without this booting
# into a terminal results in the service crashing with an error.
systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
systemd.user.sockets.pipewire-pulse.wantedBy = lib.mkIf (cfg.socketActivation && cfg.pulse.enable) ["sockets.target"];
systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
services.udev.packages = [ cfg.package ];
# If any paths are updated here they must also be updated in the package test.
environment.etc."alsa/conf.d/49-pipewire-modules.conf" = mkIf cfg.alsa.enable {
text = ''
pcm_type.pipewire {
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;
${optionalString enable32BitAlsaPlugins
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;"}
}
ctl_type.pipewire {
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;
${optionalString enable32BitAlsaPlugins
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;"}
}
'';
};
environment.etc."alsa/conf.d/50-pipewire.conf" = mkIf cfg.alsa.enable {
source = "${cfg.package}/share/alsa/alsa.conf.d/50-pipewire.conf";
};
environment.etc."alsa/conf.d/99-pipewire-default.conf" = mkIf cfg.alsa.enable {
source = "${cfg.package}/share/alsa/alsa.conf.d/99-pipewire-default.conf";
};
environment.sessionVariables.LD_LIBRARY_PATH =
lib.optional cfg.jack.enable "/run/current-system/sw/lib/pipewire";
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/464#note_723554
systemd.user.services.pipewire.environment = {
"PIPEWIRE_LINK_PASSIVE" = "1";
"PIPEWIRE_CONFIG_FILE" = pkgs.writeText "pipewire.conf" (toSPAJSON cfg.config);
};
};
}

View file

@ -1,12 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hardware.bluetooth;
bluez-bluetooth = cfg.package;
package = cfg.package;
in {
inherit (lib)
mkDefault mkEnableOption mkIf mkOption
mkRenamedOptionModule mkRemovedOptionModule
concatStringsSep escapeShellArgs
optional optionals optionalAttrs recursiveUpdate types;
cfgFmt = pkgs.formats.ini { };
# bluez will complain if some of the sections are not found, so just make them
# empty (but present in the file) for now
defaults = {
General.ControllerMode = "dual";
Controller = { };
GATT = { };
Policy.AutoEnable = cfg.powerOnBoot;
};
hasDisabledPlugins = builtins.length cfg.disabledPlugins > 0;
in
{
imports = [
(mkRenamedOptionModule [ "hardware" "bluetooth" "config" ] [ "hardware" "bluetooth" "settings" ])
(mkRemovedOptionModule [ "hardware" "bluetooth" "extraConfig" ] ''
Use hardware.bluetooth.settings instead.
This is part of the general move to use structured settings instead of raw
text for config as introduced by RFC0042:
https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
'')
];
###### interface
@ -18,7 +45,7 @@ in {
hsphfpd.enable = mkEnableOption "support for hsphfpd[-prototype] implementation";
powerOnBoot = mkOption {
type = types.bool;
type = types.bool;
default = true;
description = "Whether to power up the default Bluetooth controller on boot.";
};
@ -38,8 +65,15 @@ in {
'';
};
config = mkOption {
type = with types; attrsOf (attrsOf (oneOf [ bool int str ]));
disabledPlugins = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Built-in plugins to disable";
};
settings = mkOption {
type = cfgFmt.type;
default = { };
example = {
General = {
ControllerMode = "bredr";
@ -47,79 +81,65 @@ in {
};
description = "Set configuration for system-wide bluetooth (/etc/bluetooth/main.conf).";
};
extraConfig = mkOption {
type = with types; nullOr lines;
default = null;
example = ''
[General]
ControllerMode = bredr
'';
description = ''
Set additional configuration for system-wide bluetooth (/etc/bluetooth/main.conf).
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
warnings = optional (cfg.extraConfig != null) "hardware.bluetooth.`extraConfig` is deprecated, please use hardware.bluetooth.`config`.";
environment.systemPackages = [ package ]
++ optional cfg.hsphfpd.enable pkgs.hsphfpd;
hardware.bluetooth.config = {
Policy = {
AutoEnable = mkDefault cfg.powerOnBoot;
};
};
environment.systemPackages = [ bluez-bluetooth ]
++ optionals cfg.hsphfpd.enable [ pkgs.hsphfpd ];
environment.etc."bluetooth/main.conf"= {
source = pkgs.writeText "main.conf"
(generators.toINI { } cfg.config + optionalString (cfg.extraConfig != null) cfg.extraConfig);
};
services.udev.packages = [ bluez-bluetooth ];
services.dbus.packages = [ bluez-bluetooth ]
++ optionals cfg.hsphfpd.enable [ pkgs.hsphfpd ];
systemd.packages = [ bluez-bluetooth ];
environment.etc."bluetooth/main.conf".source =
cfgFmt.generate "main.conf" (recursiveUpdate defaults cfg.settings);
services.udev.packages = [ package ];
services.dbus.packages = [ package ]
++ optional cfg.hsphfpd.enable pkgs.hsphfpd;
systemd.packages = [ package ];
systemd.services = {
bluetooth = {
wantedBy = [ "bluetooth.target" ];
aliases = [ "dbus-org.bluez.service" ];
# restarting can leave people without a mouse/keyboard
unitConfig.X-RestartIfChanged = false;
};
}
// (optionalAttrs cfg.hsphfpd.enable {
hsphfpd = {
after = [ "bluetooth.service" ];
requires = [ "bluetooth.service" ];
wantedBy = [ "multi-user.target" ];
description = "A prototype implementation used for connecting HSP/HFP Bluetooth devices";
serviceConfig.ExecStart = "${pkgs.hsphfpd}/bin/hsphfpd.pl";
bluetooth =
let
# `man bluetoothd` will refer to main.conf in the nix store but bluez
# will in fact load the configuration file at /etc/bluetooth/main.conf
# so force it here to avoid any ambiguity and things suddenly breaking
# if/when the bluez derivation is changed.
args = [ "-f /etc/bluetooth/main.conf" ]
++ optional hasDisabledPlugins
"--noplugin=${concatStringsSep "," cfg.disabledPlugins}";
in
{
wantedBy = [ "bluetooth.target" ];
aliases = [ "dbus-org.bluez.service" ];
serviceConfig.ExecStart = [
""
"${package}/libexec/bluetooth/bluetoothd ${escapeShellArgs args}"
];
# restarting can leave people without a mouse/keyboard
unitConfig.X-RestartIfChanged = false;
};
})
;
}
// (optionalAttrs cfg.hsphfpd.enable {
hsphfpd = {
after = [ "bluetooth.service" ];
requires = [ "bluetooth.service" ];
wantedBy = [ "bluetooth.target" ];
description = "A prototype implementation used for connecting HSP/HFP Bluetooth devices";
serviceConfig.ExecStart = "${pkgs.hsphfpd}/bin/hsphfpd.pl";
};
});
systemd.user.services = {
obex.aliases = [ "dbus-org.bluez.obex.service" ];
}
// (optionalAttrs cfg.hsphfpd.enable {
telephony_client = {
wantedBy = [ "default.target"];
description = "telephony_client for hsphfpd";
serviceConfig.ExecStart = "${pkgs.hsphfpd}/bin/telephony_client.pl";
};
})
;
// optionalAttrs cfg.hsphfpd.enable {
telephony_client = {
wantedBy = [ "default.target" ];
description = "telephony_client for hsphfpd";
serviceConfig.ExecStart = "${pkgs.hsphfpd}/bin/telephony_client.pl";
};
};
};
}

View file

@ -16,7 +16,14 @@ let
alias = domain: list: "${list}: \"|${pkgs.mlmmj}/bin/mlmmj-receive -L ${listDir domain list}/\"";
subjectPrefix = list: "[${list}]";
listAddress = domain: list: "${list}@${domain}";
customHeaders = domain: list: [ "List-Id: ${list}" "Reply-To: ${list}@${domain}" ];
customHeaders = domain: list: [
"List-Id: ${list}"
"Reply-To: ${list}@${domain}"
"List-Post: <mailto:${list}@${domain}>"
"List-Help: <mailto:${list}+help@${domain}>"
"List-Subscribe: <mailto:${list}+subscribe@${domain}>"
"List-Unsubscribe: <mailto:${list}+unsubscribe@${domain}>"
];
footer = domain: list: "To unsubscribe send a mail to ${list}+unsubscribe@${domain}";
createList = d: l:
let ctlDir = listCtl d l; in
@ -110,17 +117,29 @@ in
services.postfix = {
enable = true;
recipientDelimiter= "+";
extraMasterConf = ''
mlmmj unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj}/bin/mlmmj-receive -F -L ${spoolDir}/$nexthop
'';
masterConfig.mlmmj = {
type = "unix";
private = true;
privileged = true;
chroot = false;
wakeup = 0;
command = "pipe";
args = [
"flags=ORhu"
"user=mlmmj"
"argv=${pkgs.mlmmj}/bin/mlmmj-receive"
"-F"
"-L"
"${spoolDir}/$nexthop"
];
};
extraAliases = concatMapLines (alias cfg.listDomain) cfg.mailLists;
extraConfig = ''
transport_maps = hash:${stateDir}/transports
virtual_alias_maps = hash:${stateDir}/virtuals
propagate_unmatched_extensions = virtual
'';
extraConfig = "propagate_unmatched_extensions = virtual";
virtual = concatMapLines (virtual cfg.listDomain) cfg.mailLists;
transport = concatMapLines (transport cfg.listDomain) cfg.mailLists;
};
environment.systemPackages = [ pkgs.mlmmj ];
@ -129,10 +148,8 @@ in
${pkgs.coreutils}/bin/mkdir -p ${stateDir} ${spoolDir}/${cfg.listDomain}
${pkgs.coreutils}/bin/chown -R ${cfg.user}:${cfg.group} ${spoolDir}
${concatMapLines (createList cfg.listDomain) cfg.mailLists}
echo "${concatMapLines (virtual cfg.listDomain) cfg.mailLists}" > ${stateDir}/virtuals
echo "${concatMapLines (transport cfg.listDomain) cfg.mailLists}" > ${stateDir}/transports
${pkgs.postfix}/bin/postmap ${stateDir}/virtuals
${pkgs.postfix}/bin/postmap ${stateDir}/transports
${pkgs.postfix}/bin/postmap /etc/postfix/virtual
${pkgs.postfix}/bin/postmap /etc/postfix/transport
'';
systemd.services.mlmmj-maintd = {

View file

@ -111,7 +111,6 @@ in {
group = lib.mkOption {
description = ''
Group under which mastodon runs.
If it is set to "mastodon", a group will be created.
'';
type = lib.types.str;
default = "mastodon";
@ -555,10 +554,9 @@ in {
};
})
(lib.attrsets.setAttrByPath [ cfg.user "packages" ] [ cfg.package mastodonEnv ])
(lib.mkIf cfg.configureNginx {${config.services.nginx.user}.extraGroups = [ cfg.user ];})
];
users.groups.mastodon = lib.mkIf (cfg.group == "mastodon") { };
users.groups.${cfg.group}.members = lib.optional cfg.configureNginx config.services.nginx.user;
};
meta.maintainers = with lib.maintainers; [ happy-river erictapen ];

View file

@ -602,6 +602,7 @@ in {
"^~ /.well-known" = {
priority = 210;
extraConfig = ''
absolute_redirect off;
location = /.well-known/carddav {
return 301 /remote.php/dav;
}

View file

@ -197,12 +197,11 @@ in
config = mkMerge [
(mkIf (cfg.enable || flashbackEnabled) {
# Seed our configuration into nixos-generate-config
system.nixos-generate-config.desktopConfiguration = ''
system.nixos-generate-config.desktopConfiguration = [''
# Enable the GNOME 3 Desktop Environment.
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome3.enable = true;
'';
''];
services.gnome3.core-os-services.enable = true;
services.gnome3.core-shell.enable = true;

View file

@ -184,12 +184,11 @@ in
config = mkMerge [
(mkIf cfg.enable {
# Seed our configuration into nixos-generate-config
system.nixos-generate-config.desktopConfiguration = ''
system.nixos-generate-config.desktopConfiguration = [''
# Enable the Plasma 5 Desktop Environment.
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
'';
''];
services.xserver.desktopManager.session = singleton {
name = "plasma5";

View file

@ -31,6 +31,8 @@ in {
"hv_balloon" "hv_netvsc" "hv_storvsc" "hv_utils" "hv_vmbus"
];
initrd.availableKernelModules = [ "hyperv_keyboard" ];
kernelParams = [
"video=hyperv_fb:${cfg.videoMode} elevator=noop"
];

View file

@ -333,7 +333,6 @@ in
redis = handleTest ./redis.nix {};
redmine = handleTest ./redmine.nix {};
restic = handleTest ./restic.nix {};
ripgrep = handleTest ./ripgrep.nix {};
robustirc-bridge = handleTest ./robustirc-bridge.nix {};
roundcube = handleTest ./roundcube.nix {};
rspamd = handleTest ./rspamd.nix {};

View file

@ -11,12 +11,11 @@ import ./make-test-python.nix ({ lib, ... } : {
}
'';
system.nixos-generate-config.desktopConfiguration = ''
system.nixos-generate-config.desktopConfiguration = [''
# DESKTOP
# services.xserver.enable = true;
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome3.enable = true;
'';
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome3.enable = true;
''];
};
testScript = ''
start_all()

View file

@ -1,13 +0,0 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "ripgrep";
meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.ripgrep = { pkgs, ... }: { environment.systemPackages = [ pkgs.ripgrep ]; };
testScript = ''
ripgrep.succeed('echo "abc\nbcd\ncde" > /tmp/foo')
assert "bcd" in ripgrep.succeed("rg -N 'bcd' /tmp/foo")
assert "bcd\ncde" in ripgrep.succeed("rg -N 'cd' /tmp/foo")
assert "ripgrep ${pkgs.ripgrep.version}" in ripgrep.succeed("rg --version | head -1")
'';
})

View file

@ -1,7 +1,7 @@
{ mkDerivation
, lib
, stdenv
, fetchFromGitHub
, fetchpatch
, qmake
, pkg-config
, qttools
@ -21,10 +21,15 @@ mkDerivation rec {
sha256 = "0iddqfw951dw9xpl4w7310sl4z544507ppb12i8g4fzvlxfw2ifc";
};
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace BambooTracker/BambooTracker.pro \
--replace '# Temporary known-error downgrades here' 'CPP_WARNING_FLAGS += -Wno-missing-braces'
'';
# TODO Remove when updating past 0.4.6
# Fixes build failure on darwin
patches = [
(fetchpatch {
name = "bambootracker-Add_braces_in_initialization_of_std-array.patch";
url = "https://github.com/rerrahkr/BambooTracker/commit/0fc96c60c7ae6c2504ee696bb7dec979ac19717d.patch";
sha256 = "1z28af46mqrgnyrr4i8883gp3wablkk8rijnj0jvpq01s4m2sfjn";
})
];
nativeBuildInputs = [ qmake qttools pkg-config ];
@ -40,6 +45,5 @@ mkDerivation rec {
license = licenses.gpl2Only;
platforms = platforms.all;
maintainers = with maintainers; [ OPNA2608 ];
broken = stdenv.isDarwin;
};
}

View file

@ -0,0 +1,36 @@
{ lib, fetchFromGitHub, rustPlatform
, pkg-config, wrapGAppsHook
}:
rustPlatform.buildRustPackage rec {
pname = "muso";
version = "2.0.0";
src = fetchFromGitHub {
owner = "quebin31";
repo = pname;
rev = "68cc90869bcc0f202830a318fbfd6bb9bdb75a39";
sha256 = "1dnfslliss173igympl7h1zc0qz0g10kf96dwrcj6aglmvvw426p";
};
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
preConfigure = ''
substituteInPlace lib/utils.rs \
--replace "/usr/share/muso" "$out/share/muso"
'';
postInstall = ''
mkdir -p $out/share/muso
cp share/* $out/share/muso/
'';
cargoSha256 = "06jgk54r3f8gq6iylv5rgsawss3hc5kmvk02y4gl8iwfnw4xrvmg";
meta = with lib; {
description = "An automatic music sorter (based on ID3 tags)";
homepage = "https://github.com/quebin31/muso";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ bloomvdomino ];
};
}

View file

@ -56,7 +56,7 @@ mkDerivation rec {
description = "Cross-platform Milkdrop-compatible music visualizer";
license = lib.licenses.lgpl21;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ajs124 ];
maintainers = with lib.maintainers; [ ];
longDescription = ''
The open-source project that reimplements the esteemed Winamp Milkdrop by Geiss in a more modern, cross-platform reusable library.
Read an audio input and produces mesmerizing visuals, detecting tempo, and rendering advanced equations into a limitless array of user-contributed visualizations.

View file

@ -15,13 +15,13 @@ in
stdenv.mkDerivation rec {
pname = "btcpayserver";
version = "1.0.5.9";
version = "1.0.6.8";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "011pp94i49fx587ng16m6ml63vwiysjvpkijihrk6xamz78zddgx";
sha256 = "1znmix9w7ahzyb933lxzqv6j8j5qycknq3gmnkakj749ksshql1b";
};
nativeBuildInputs = [ dotnetSdk dotnetPackages.Nuget makeWrapper ];

View file

@ -1,8 +1,13 @@
{ fetchNuGet }: [
(fetchNuGet {
name = "AngleSharp.Css";
version = "0.14.2";
sha256 = "1d34a8ab5dri4wlw07jvk7b1z0d0zizwihwpdfva3sxhb4279ahd";
})
(fetchNuGet {
name = "AngleSharp";
version = "0.9.11";
sha256 = "17vf1bizskkxr8pf547lk2b48m12wv3si83gxk145i73bf9gi64a";
version = "0.14.0";
sha256 = "1zgwhh1fp2mmaplvpgm86rpmslix3wqfxf0d3hxx1gxwfgr6wxm6";
})
(fetchNuGet {
name = "AWSSDK.Core";
@ -136,8 +141,18 @@
})
(fetchNuGet {
name = "HtmlSanitizer";
version = "4.0.217";
sha256 = "0szay9mf5mmrp1hx0yc175aaalv76qg0j515lfs133j1d95lj26d";
version = "5.0.372";
sha256 = "1gllp58vdbql2ybwf05i2178x7p4g8zyyk64317d1pyss5217g7r";
})
(fetchNuGet {
name = "McMaster.NETCore.Plugins.Mvc";
version = "1.3.1";
sha256 = "1dh58ijwn6q6id0jpzr4hpfl0y4ak43zq4m8rsi5j2qv8vasq1mi";
})
(fetchNuGet {
name = "McMaster.NETCore.Plugins";
version = "1.3.1";
sha256 = "0jrp7sshnvg7jcb52gfhwmg1jy31k9dxdf4061yggwcgpfskyg7n";
})
(fetchNuGet {
name = "Microsoft.AspNet.SignalR.Client";
@ -209,11 +224,6 @@
version = "3.1.1";
sha256 = "0arqmy04dd0r4wm2fin66gxxwj2kirbgxyf3w7kq6f73lrnazhq0";
})
(fetchNuGet {
name = "Microsoft.Bcl.AsyncInterfaces";
version = "1.1.0";
sha256 = "1dq5yw7cy6s42193yl4iqscfw5vzkjkgv0zyy32scr4jza6ni1a1";
})
(fetchNuGet {
name = "Microsoft.Bcl.AsyncInterfaces";
version = "1.1.1";
@ -294,26 +304,21 @@
version = "2.0.4";
sha256 = "1fdzln4im9hb55agzwchbfgm3vmngigmbpci5j89b0gqcxixmv8j";
})
(fetchNuGet {
name = "Microsoft.DotNet.PlatformAbstractions";
version = "3.1.0";
sha256 = "1fg1zggza45pa8zlcf8llqh6v47fqi44azsia68kmsg2q9r1r4mq";
})
(fetchNuGet {
name = "Microsoft.DotNet.PlatformAbstractions";
version = "3.1.4";
sha256 = "1s5h96zdc3vh1v03gizmqfw5hmksajw10bdrj79pm8brbyzipxia";
})
(fetchNuGet {
name = "Microsoft.EntityFrameworkCore.Abstractions";
version = "3.1.0";
sha256 = "1bd6hilnwp47z3l14qspdxi5f5nhv6rivarc6w8wil425bq0h3pd";
})
(fetchNuGet {
name = "Microsoft.EntityFrameworkCore.Abstractions";
version = "3.1.4";
sha256 = "07l7137pzwh0k4m53ji5j6a2zmbbzrl164p18wxcri77ds5is4g7";
})
(fetchNuGet {
name = "Microsoft.EntityFrameworkCore.Analyzers";
version = "3.1.0";
sha256 = "1pjn4wwhxgsiap7byld114kx6m0nm6696r8drspqic7lskm4y305";
})
(fetchNuGet {
name = "Microsoft.EntityFrameworkCore.Analyzers";
version = "3.1.4";
@ -344,31 +349,16 @@
version = "3.1.4";
sha256 = "009mcmakw0p7k8xrz920a8qc0rjv361awiz8jia5i5a8p5ihgkbx";
})
(fetchNuGet {
name = "Microsoft.EntityFrameworkCore";
version = "3.1.0";
sha256 = "1l12lsk1xfrv5pjnm0b9w9kncgdh0pcjcbxl4zrsg82s7bs7dhda";
})
(fetchNuGet {
name = "Microsoft.EntityFrameworkCore";
version = "3.1.4";
sha256 = "11w63yp7fk9qwmnq3lmpf1h30mlbzfx4zpm89vrs0lprj86g0742";
})
(fetchNuGet {
name = "Microsoft.Extensions.Caching.Abstractions";
version = "3.1.0";
sha256 = "0j5m2a48rwyzzvbz0hpr2md35iv78b86zyqjnrjq0y4vb7sairc0";
})
(fetchNuGet {
name = "Microsoft.Extensions.Caching.Abstractions";
version = "3.1.4";
sha256 = "09f96pvpyzylpdaiw3lsvr7p6rs4i21mmhsxl6pkivg5lpfb79sk";
})
(fetchNuGet {
name = "Microsoft.Extensions.Caching.Memory";
version = "3.1.0";
sha256 = "1hi61647apn25kqjcb37nqafp8fikymdrk43j3kxjbwwwx507jy1";
})
(fetchNuGet {
name = "Microsoft.Extensions.Caching.Memory";
version = "3.1.4";
@ -389,11 +379,6 @@
version = "2.1.0";
sha256 = "03gzlr3z9j1xnr1k6y91zgxpz3pj27i3zsvjwj7i8jqnlqmk7pxd";
})
(fetchNuGet {
name = "Microsoft.Extensions.Configuration.Abstractions";
version = "3.1.0";
sha256 = "1f7h52kamljglx5k08ccryilvk6d6cvr9c26lcb6b2c091znzk0q";
})
(fetchNuGet {
name = "Microsoft.Extensions.Configuration.Abstractions";
version = "3.1.4";
@ -404,11 +389,6 @@
version = "2.0.0";
sha256 = "1prvdbma6r18n5agbhhabv6g357p1j70gq4m9g0vs859kf44nrgc";
})
(fetchNuGet {
name = "Microsoft.Extensions.Configuration.Binder";
version = "3.1.0";
sha256 = "13jj7jxihiswmhmql7r5jydbca4x5qj6h7zq10z17gagys6dc7pw";
})
(fetchNuGet {
name = "Microsoft.Extensions.Configuration.Binder";
version = "3.1.4";
@ -439,11 +419,6 @@
version = "2.1.0";
sha256 = "04rjl38wlr1jjjpbzgf64jp0ql6sbzbil0brwq9mgr3hdgwd7vx2";
})
(fetchNuGet {
name = "Microsoft.Extensions.Configuration";
version = "3.1.0";
sha256 = "1rszgz0rd5kvib5fscz6ss3pkxyjwqy0xpd4f2ypgzf5z5g5d398";
})
(fetchNuGet {
name = "Microsoft.Extensions.Configuration";
version = "3.1.4";
@ -459,11 +434,6 @@
version = "2.1.0";
sha256 = "0c0cx8r5xkjpxmcfp51959jnp55qjvq28d9vaslk08avvi1by12s";
})
(fetchNuGet {
name = "Microsoft.Extensions.DependencyInjection.Abstractions";
version = "3.1.0";
sha256 = "1pvms778xkyv1a3gfwrxnh8ja769cxi416n7pcidn9wvg15ifvbh";
})
(fetchNuGet {
name = "Microsoft.Extensions.DependencyInjection.Abstractions";
version = "3.1.4";
@ -474,11 +444,6 @@
version = "2.0.0";
sha256 = "018izzgykaqcliwarijapgki9kp2c560qv8qsxdjywr7byws5apq";
})
(fetchNuGet {
name = "Microsoft.Extensions.DependencyInjection";
version = "3.1.0";
sha256 = "1xc61dy07bn2q73mx1z3ylrw80xpa682qjby13gklnqq636a3gab";
})
(fetchNuGet {
name = "Microsoft.Extensions.DependencyInjection";
version = "3.1.4";
@ -489,6 +454,11 @@
version = "2.0.4";
sha256 = "041i1vlcibpzgalxxzdk81g5pgmqvmz2g61k0rqa2sky0wpvijx9";
})
(fetchNuGet {
name = "Microsoft.Extensions.DependencyModel";
version = "3.1.0";
sha256 = "12nrdw3q9wl5zry8gb3sw003a0iyk2gvps2ij813l7lim38wy1mi";
})
(fetchNuGet {
name = "Microsoft.Extensions.DependencyModel";
version = "3.1.1";
@ -559,11 +529,6 @@
version = "2.1.0";
sha256 = "1gvgif1wcx4k6pv7gc00qv1hid945jdywy1s50s33q0hfd91hbnj";
})
(fetchNuGet {
name = "Microsoft.Extensions.Logging.Abstractions";
version = "3.1.0";
sha256 = "1zyalrcksszmn9r5xjnirfh7847axncgzxkk3k5srbvlcch8fw8g";
})
(fetchNuGet {
name = "Microsoft.Extensions.Logging.Abstractions";
version = "3.1.4";
@ -579,11 +544,6 @@
version = "2.0.0";
sha256 = "1jkwjcq1ld9znz1haazk8ili2g4pzfdp6i7r7rki4hg3jcadn386";
})
(fetchNuGet {
name = "Microsoft.Extensions.Logging";
version = "3.1.0";
sha256 = "1d3yhqj1rav7vswm747j7w8fh8paybji4rz941hhlq4b12mfqfh4";
})
(fetchNuGet {
name = "Microsoft.Extensions.Logging";
version = "3.1.4";
@ -599,11 +559,6 @@
version = "2.0.0";
sha256 = "0g4zadlg73f507krilhaaa7h0jdga216syrzjlyf5fdk25gxmjqh";
})
(fetchNuGet {
name = "Microsoft.Extensions.Options";
version = "3.1.0";
sha256 = "0akccwhpn93a4qrssyb3rszdsp3j4p9hlxbsb7yhqb78xydaqhyh";
})
(fetchNuGet {
name = "Microsoft.Extensions.Options";
version = "3.1.4";
@ -629,11 +584,6 @@
version = "2.1.0";
sha256 = "1r9gzwdfmb8ysnc4nzmyz5cyar1lw0qmizsvrsh252nhlyg06nmb";
})
(fetchNuGet {
name = "Microsoft.Extensions.Primitives";
version = "3.1.0";
sha256 = "1w1y22njywwysi8qjnj4m83qhbq0jr4mmjib0hfawz6cwamh7xrb";
})
(fetchNuGet {
name = "Microsoft.Extensions.Primitives";
version = "3.1.4";
@ -669,6 +619,11 @@
version = "2.1.2";
sha256 = "1507hnpr9my3z4w1r6xk5n0s1j3y6a2c2cnynj76za7cphxi1141";
})
(fetchNuGet {
name = "Microsoft.NETCore.Platforms";
version = "3.1.0";
sha256 = "1gc1x8f95wk8yhgznkwsg80adk1lc65v9n5rx4yaa4bc5dva0z3j";
})
(fetchNuGet {
name = "Microsoft.NETCore.Targets";
version = "1.0.1";
@ -699,6 +654,11 @@
version = "4.3.0";
sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq";
})
(fetchNuGet {
name = "Microsoft.Win32.SystemEvents";
version = "4.7.0";
sha256 = "0pjll2a62hc576hd4wgyasva0lp733yllmk54n37svz5ac7nfz0q";
})
(fetchNuGet {
name = "MySqlConnector";
version = "0.61.0";
@ -729,6 +689,11 @@
version = "5.0.60";
sha256 = "0pin4ldfz5lfxyd47mj1ypyp8lmj0v5nq5zvygdjna956vphd39v";
})
(fetchNuGet {
name = "NBitcoin";
version = "5.0.68";
sha256 = "0k275mbp9wannm10pqj4nv8agjc1f6hsrfhl0m6ax1apv81sfxcd";
})
(fetchNuGet {
name = "NBitpayClient";
version = "1.0.0.39";
@ -849,6 +814,11 @@
version = "1.8.1.3";
sha256 = "1lv1ljaz8df835jgmp3ny1xgqqjf1s9f25baw7bf8d24qlf25i2g";
})
(fetchNuGet {
name = "QRCoder";
version = "1.4.1";
sha256 = "1xgwhpqrm4ycnj8nk4ibxfwkmkiwc5i15l1za3ci5alghlpcb6ch";
})
(fetchNuGet {
name = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.0";
@ -869,11 +839,6 @@
version = "4.3.0";
sha256 = "1vvivbqsk6y4hzcid27pqpm5bsi6sc50hvqwbcx8aap5ifrxfs8d";
})
(fetchNuGet {
name = "runtime.native.System.Net.Http";
version = "4.0.1";
sha256 = "1hgv2bmbaskx77v8glh7waxws973jn4ah35zysnkxmf0196sfxg6";
})
(fetchNuGet {
name = "runtime.native.System.Net.Http";
version = "4.3.0";
@ -949,10 +914,15 @@
version = "4.3.0";
sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5";
})
(fetchNuGet {
name = "Selenium.Support";
version = "3.141.0";
sha256 = "1gqwzbfq7i9jz830b0jibsis0qfxs8sl10n1nja02c6s637cwzib";
})
(fetchNuGet {
name = "Selenium.WebDriver.ChromeDriver";
version = "85.0.4183.8700";
sha256 = "0klyqmwa6yc0ibbmci51mzb2vl6n13qlk06chc9w78i0a43fs382";
version = "87.0.4280.8800";
sha256 = "1zrizydlhjv81r1fa5g8wzxrx1cxly3ip7pargj48hdx419iblfr";
})
(fetchNuGet {
name = "Selenium.WebDriver";
@ -1064,11 +1034,6 @@
version = "1.5.0";
sha256 = "1d5gjn5afnrf461jlxzawcvihz195gayqpcfbv6dd7pxa9ialn06";
})
(fetchNuGet {
name = "System.Collections.Immutable";
version = "1.7.0";
sha256 = "1gik4sn9jsi1wcy1pyyp0r4sn2g17cwrsh24b2d52vif8p2h24zx";
})
(fetchNuGet {
name = "System.Collections.Immutable";
version = "1.7.1";
@ -1134,21 +1099,11 @@
version = "4.3.0";
sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y";
})
(fetchNuGet {
name = "System.Diagnostics.DiagnosticSource";
version = "4.0.0";
sha256 = "1n6c3fbz7v8d3pn77h4v5wvsfrfg7v1c57lg3nff3cjyh597v23m";
})
(fetchNuGet {
name = "System.Diagnostics.DiagnosticSource";
version = "4.3.0";
sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq";
})
(fetchNuGet {
name = "System.Diagnostics.DiagnosticSource";
version = "4.7.0";
sha256 = "0cr0v5dz8l5ackxv6b772fjcyj2nimqmrmzanjs4cw2668v568n1";
})
(fetchNuGet {
name = "System.Diagnostics.DiagnosticSource";
version = "4.7.1";
@ -1179,6 +1134,11 @@
version = "4.3.0";
sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4";
})
(fetchNuGet {
name = "System.Drawing.Common";
version = "4.7.0";
sha256 = "0yfw7cpl54mgfcylvlpvrl0c8r1b0zca6p7r3rcwkvqy23xqcyhg";
})
(fetchNuGet {
name = "System.Dynamic.Runtime";
version = "4.0.11";
@ -1189,21 +1149,11 @@
version = "4.3.0";
sha256 = "1d951hrvrpndk7insiag80qxjbf2y0y39y8h5hnq9612ws661glk";
})
(fetchNuGet {
name = "System.Globalization.Calendars";
version = "4.0.1";
sha256 = "0bv0alrm2ck2zk3rz25lfyk9h42f3ywq77mx1syl6vvyncnpg4qh";
})
(fetchNuGet {
name = "System.Globalization.Calendars";
version = "4.3.0";
sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq";
})
(fetchNuGet {
name = "System.Globalization.Extensions";
version = "4.0.1";
sha256 = "0hjhdb5ri8z9l93bw04s7ynwrjrhx2n0p34sf33a9hl9phz69fyc";
})
(fetchNuGet {
name = "System.Globalization.Extensions";
version = "4.3.0";
@ -1299,11 +1249,6 @@
version = "4.5.3";
sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a";
})
(fetchNuGet {
name = "System.Net.Http";
version = "4.1.0";
sha256 = "1i5rqij1icg05j8rrkw4gd4pgia1978mqhjzhsjg69lvwcdfg8yb";
})
(fetchNuGet {
name = "System.Net.Http";
version = "4.3.0";
@ -1329,11 +1274,6 @@
version = "4.3.0";
sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii";
})
(fetchNuGet {
name = "System.Net.Requests";
version = "4.0.11";
sha256 = "13mka55sa6dg6nw4zdrih44gnp8hnj5azynz47ljsh2791lz3d9h";
})
(fetchNuGet {
name = "System.Net.Security";
version = "4.3.0";
@ -1349,11 +1289,6 @@
version = "4.3.0";
sha256 = "1ssa65k6chcgi6mfmzrznvqaxk8jp0gvl77xhf1hbzakjnpxspla";
})
(fetchNuGet {
name = "System.Net.WebHeaderCollection";
version = "4.0.1";
sha256 = "10bxpxj80c4z00z3ksrfswspq9qqsw8jwxcbzvymzycb97m9b55q";
})
(fetchNuGet {
name = "System.Net.WebHeaderCollection";
version = "4.3.0";
@ -1594,21 +1529,11 @@
version = "4.3.0";
sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml";
})
(fetchNuGet {
name = "System.Security.Cryptography.Cng";
version = "4.2.0";
sha256 = "118jijz446kix20blxip0f0q8mhsh9bz118mwc2ch1p6g7facpzc";
})
(fetchNuGet {
name = "System.Security.Cryptography.Cng";
version = "4.3.0";
sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv";
})
(fetchNuGet {
name = "System.Security.Cryptography.Csp";
version = "4.0.0";
sha256 = "1cwv8lqj8r15q81d2pz2jwzzbaji0l28xfrpw29kdpsaypm92z2q";
})
(fetchNuGet {
name = "System.Security.Cryptography.Csp";
version = "4.3.0";
@ -1624,11 +1549,6 @@
version = "4.3.0";
sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32";
})
(fetchNuGet {
name = "System.Security.Cryptography.OpenSsl";
version = "4.0.0";
sha256 = "16sx3cig3d0ilvzl8xxgffmxbiqx87zdi8fc73i3i7zjih1a7f4q";
})
(fetchNuGet {
name = "System.Security.Cryptography.OpenSsl";
version = "4.3.0";
@ -1649,11 +1569,6 @@
version = "4.5.0";
sha256 = "11qlc8q6b7xlspayv07718ibzvlj6ddqqxkvcbxv5b24d5kzbrb7";
})
(fetchNuGet {
name = "System.Security.Cryptography.X509Certificates";
version = "4.1.0";
sha256 = "0clg1bv55mfv5dq00m19cp634zx6inm31kf8ppbq1jgyjf2185dh";
})
(fetchNuGet {
name = "System.Security.Cryptography.X509Certificates";
version = "4.3.0";
@ -1689,6 +1604,11 @@
version = "4.3.0";
sha256 = "12cm2zws06z4lfc4dn31iqv7072zyi4m910d4r6wm8yx85arsfxf";
})
(fetchNuGet {
name = "System.Text.Encoding.CodePages";
version = "4.5.0";
sha256 = "19x38911pawq4mrxrm04l2bnxwxxlzq8v8rj4cbxnfjj8pnd3vj3";
})
(fetchNuGet {
name = "System.Text.Encoding.CodePages";
version = "4.5.1";

View file

@ -15,13 +15,13 @@ in
stdenv.mkDerivation rec {
pname = "nbxplorer";
version = "2.1.46";
version = "2.1.49";
src = fetchFromGitHub {
owner = "dgarage";
repo = "NBXplorer";
rev = "v${version}";
sha256 = "1aph7yiwmch7s7x1qkzqv1shs3v6kg8i2s7266la0yp9ksf3w35p";
sha256 = "0xg5gbq6rbzgsbgwf94qcy2b0m5kdspi6hc5a64smaj9i7i0136l";
};
nativeBuildInputs = [ dotnetSdk dotnetPackages.Nuget makeWrapper ];

View file

@ -181,23 +181,18 @@
})
(fetchNuGet {
name = "NBitcoin.Altcoins";
version = "2.0.21";
sha256 = "0xmygiwjlia7fbxy63893jb15g6fxggxxr9bbm8znd9bs3jzp2g1";
version = "2.0.28";
sha256 = "1zfirfmhgigp733km9rqkgz560h5wg88bpba499x49h5j650cnn4";
})
(fetchNuGet {
name = "NBitcoin.TestFramework";
version = "2.0.12";
sha256 = "1d6lmymc9x3p74c8hc2x3m61ncnkqqgrddw9cw2m0zkvilkncsns";
version = "2.0.21";
sha256 = "1k26fkss6d7x2yqlid31z5i04b5dmlbbbwijg9c8i3d996i1z7sq";
})
(fetchNuGet {
name = "NBitcoin";
version = "5.0.58";
sha256 = "0qim9xbbj380254iyi1jsh2gnr90ddwd2593jw9a8bjwnlk7qr2c";
})
(fetchNuGet {
name = "NBitcoin";
version = "5.0.60";
sha256 = "0pin4ldfz5lfxyd47mj1ypyp8lmj0v5nq5zvygdjna956vphd39v";
version = "5.0.73";
sha256 = "0vqgcb0ws5fnkrdzqfkyh78041c6q4l22b93rr0006dd4bmqrmg1";
})
(fetchNuGet {
name = "NETStandard.Library";
@ -221,8 +216,8 @@
})
(fetchNuGet {
name = "Newtonsoft.Json";
version = "11.0.1";
sha256 = "1z68j07if1xf71lbsrgbia52r812i2dv541sy44ph4dzjjp7pd4m";
version = "11.0.2";
sha256 = "1784xi44f4k8v1fr696hsccmwpy94bz7kixxqlri98zhcxn406b2";
})
(fetchNuGet {
name = "Newtonsoft.Json";

View file

@ -3,7 +3,7 @@
, vmopts ? null
}:
{ name, product, version, src, wmClass, jdk, meta }:
{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [] }:
with lib;
@ -72,11 +72,11 @@ with stdenv; lib.makeOverridable mkDerivation rec {
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \
--prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
# Some internals want libstdc++.so.6
stdenv.cc.cc.lib libsecret
libnotify
]}" \
] ++ extraLdPath)}" \
--set JDK_HOME "$jdk" \
--set ${hiName}_JDK "$jdk" \
--set ANDROID_JAVA_HOME "$jdk" \

View file

@ -12,7 +12,7 @@ let
# Sorted alphabetically
buildClion = { name, version, src, license, description, wmClass, ... }:
lib.overrideDerivation (mkJetBrainsProduct {
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "CLion";
meta = with lib; {
@ -25,7 +25,7 @@ let
maintainers = with maintainers; [ edwtjo mic92 ];
platforms = platforms.linux;
};
}) (attrs: {
}).overrideAttrs (attrs: {
postFixup = (attrs.postFixup or "") + optionalString (stdenv.isLinux) ''
(
cd $out/clion-${version}
@ -97,7 +97,7 @@ let
});
buildGoland = { name, version, src, license, description, wmClass, ... }:
lib.overrideDerivation (mkJetBrainsProduct {
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "Goland";
meta = with lib; {
@ -112,7 +112,7 @@ let
maintainers = [ maintainers.miltador ];
platforms = platforms.linux;
};
}) (attrs: {
}).overrideAttrs (attrs: {
postFixup = (attrs.postFixup or "") + ''
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
patchelf --set-interpreter $interp $out/goland*/plugins/go/lib/dlv/linux/dlv
@ -125,6 +125,7 @@ let
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "IDEA";
extraLdPath = [ zlib ];
meta = with lib; {
homepage = "https://www.jetbrains.com/idea/";
inherit description license;
@ -134,8 +135,8 @@ let
with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
as IntelliJ.
'';
maintainers = with maintainers; [ edwtjo ];
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius ];
platforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" ];
};
});
@ -202,7 +203,7 @@ let
};
buildRider = { name, version, src, license, description, wmClass, ... }:
lib.overrideDerivation (mkJetBrainsProduct {
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "Rider";
meta = with lib; {
@ -219,7 +220,7 @@ let
maintainers = [ maintainers.miltador ];
platforms = platforms.linux;
};
}) (attrs: {
}).overrideAttrs (attrs: {
patchPhase = lib.optionalString (!stdenv.isDarwin) (attrs.patchPhase + ''
rm -rf lib/ReSharperHost/linux-x64/dotnet
mkdir -p lib/ReSharperHost/linux-x64/dotnet/
@ -241,7 +242,7 @@ let
});
buildWebStorm = { name, version, src, license, description, wmClass, ... }:
lib.overrideDerivation (mkJetBrainsProduct {
(mkJetBrainsProduct {
inherit name version src wmClass jdk;
product = "WebStorm";
meta = with lib; {
@ -255,7 +256,7 @@ let
maintainers = with maintainers; [ abaldeau ];
platforms = platforms.linux;
};
}) (attrs: {
}).overrideAttrs (attrs: {
patchPhase = (attrs.patchPhase or "") + optionalString (stdenv.isLinux) ''
# Webstorm tries to use bundled jre if available.
# Lets prevent this for the moment

View file

@ -5,15 +5,15 @@
rustPlatform.buildRustPackage rec {
pname = "kibi";
version = "0.2.1";
version = "0.2.2";
cargoSha256 = "1cbiidq0w5f9ynb09b6828p7p7y5xhpgz47n2jsl8mp96ydhy5lv";
cargoSha256 = "sha256-8iEUOLFwHBLS0HQL/oLnv6lcV3V9Hm4jMqXkqPvIF9E=";
src = fetchFromGitHub {
owner = "ilai-deutel";
repo = "kibi";
rev = "v${version}";
sha256 = "1x5bvvq33380k2qhs1bwz3f9zl5q1sl7iic47pxfkzv24bpjnypb";
sha256 = "sha256-ox1qKWxJlUIFzEqeyzG2kqZix3AHnOKFrlpf6O5QM+k=";
};
meta = with lib; {

View file

@ -0,0 +1,24 @@
{ fetchurl, lib, stdenv, xlibsWrapper, libXv, libpng }:
stdenv.mkDerivation rec {
pname = "qemacs";
version = "0.3.3";
src = fetchurl {
url = "https://bellard.org/${pname}/${pname}-${version}.tar.gz";
sha256 = "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg";
};
buildInputs = [ xlibsWrapper libpng libXv ];
preInstall = ''
mkdir -p $out/bin $out/man
'';
meta = with lib; {
homepage = "https://bellard.org/qemacs/";
description = "Very small but powerful UNIX editor";
license = licenses.lgpl2Only;
maintainers = with maintainers; [ iblech ];
};
}

View file

@ -1,6 +1,6 @@
{ ripgrep, git, fzf, makeWrapper, vim_configurable, vimPlugins, fetchFromGitHub, writeTextDir
, lib, stdenv, runCommandNoCC, remarshal, formats, spacevim_config ? import ./init.nix }:
with stdenv;
{ ripgrep, git, fzf, makeWrapper, vim_configurable, vimPlugins, fetchFromGitHub
, lib, stdenv, formats, spacevim_config ? import ./init.nix }:
let
format = formats.toml {};
vim-customized = vim_configurable.customize {
@ -11,7 +11,7 @@ let
vimrcConfig.packages.myVimPackage = with vimPlugins; { start = [ ]; };
};
spacevimdir = format.generate "init.toml" spacevim_config;
in mkDerivation rec {
in stdenv.mkDerivation rec {
pname = "spacevim";
version = "1.5.0";
src = fetchFromGitHub {

View file

@ -1,6 +1,6 @@
{ lib
, mkDerivation
, nix-update-script
, fetchFromGitHub
, substituteAll
, cmake
@ -37,22 +37,28 @@ let
rev = "1.4.1";
sha256 = "1c6a8mdxms5vh8l7shi2kqdhafbzm50pbz6g1hhgg6qslla0vfn0";
};
circleflags = fetchFromGitHub {
owner = "HatScripts";
repo = "circle-flags";
rev = "v2.0.0";
sha256 = "1xz5b6nhcxxzalcgwnw36npap71i70s50g6b63avjgjkwz1ys5j4";
};
in
mkDerivation rec {
pname = "crow-translate";
version = "2.6.2";
version = "2.7.1";
src = fetchFromGitHub {
owner = "crow-translate";
repo = "crow-translate";
rev = version;
sha256 = "1jgpqynmxmh6mrknpk5fh96lbdg799axp4cyn5rvalg3sdxajmqc";
sha256 = "sha256-YOsp/noGsYthre18fMyBj9s+YFzdHJfIJzJSm43wiZ0=";
};
patches = [
(substituteAll {
src = ./dont-fetch-external-libs.patch;
inherit singleapplication qtaskbarcontrol qhotkey qonlinetranslator;
inherit singleapplication qtaskbarcontrol qhotkey qonlinetranslator circleflags;
})
(substituteAll {
# See https://github.com/NixOS/nixpkgs/issues/86054
@ -61,10 +67,23 @@ mkDerivation rec {
})
];
postPatch = "cp -r ${circleflags}/flags/* data/icons";
nativeBuildInputs = [ cmake extra-cmake-modules qttools ];
buildInputs = [ leptonica tesseract4 qtmultimedia qtx11extras ];
postInstall = ''
substituteInPlace $out/share/applications/io.crow_translate.CrowTranslate.desktop \
--replace "Exec=qdbus" "Exec=${lib.getBin qttools}/bin/qdbus"
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
description = "A simple and lightweight translator that allows to translate and speak text using Google, Yandex and Bing";
homepage = "https://crow-translate.github.io/";

View file

@ -1,8 +1,26 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index 2576203..26162a0 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -91,12 +91,11 @@ qt5_add_translation(QM_FILES
)
configure_file(src/cmake.h.in cmake.h)
-configure_file(data/icons/flags.qrc ${CircleFlags_SOURCE_DIR}/flags/flags.qrc COPYONLY)
add_executable(${PROJECT_NAME}
${QM_FILES}
data/icons/engines/engines.qrc
- ${CircleFlags_SOURCE_DIR}/flags/flags.qrc
+ data/icons/flags.qrc
src/addlanguagedialog.cpp
src/addlanguagedialog.ui
src/cli.cpp
diff --git i/cmake/ExternalLibraries.cmake w/cmake/ExternalLibraries.cmake
index d8c88ae..47a12c0 100644
index 21eba0a..b613d3e 100644
--- i/cmake/ExternalLibraries.cmake
+++ w/cmake/ExternalLibraries.cmake
@@ -2,24 +2,20 @@ include(FetchContent)
@@ -2,29 +2,24 @@ include(FetchContent)
set(QAPPLICATION_CLASS QApplication)
FetchContent_Declare(SingleApplication
@ -30,4 +48,10 @@ index d8c88ae..47a12c0 100644
+ SOURCE_DIR @qonlinetranslator@
)
FetchContent_MakeAvailable(SingleApplication QTaskbarControl QHotkey QOnlineTranslator)
FetchContent_Declare(CircleFlags
- GIT_REPOSITORY https://github.com/HatScripts/circle-flags
- GIT_TAG v2.0.0
+ SOURCE_DIR @circleflags@
)
FetchContent_MakeAvailable(SingleApplication QTaskbarControl QHotkey QOnlineTranslator CircleFlags)

View file

@ -1,13 +1,13 @@
diff --git i/src/settings/appsettings.cpp w/src/settings/appsettings.cpp
index 7be4573..e65994e 100644
--- i/src/settings/appsettings.cpp
+++ w/src/settings/appsettings.cpp
@@ -82,7 +82,7 @@ void AppSettings::applyLanguage(QLocale::Language lang)
QLocale::setDefault(QLocale(lang));
diff --git c/src/settings/appsettings.cpp i/src/settings/appsettings.cpp
index ff99f64..fa929ae 100644
--- c/src/settings/appsettings.cpp
+++ i/src/settings/appsettings.cpp
@@ -80,7 +80,7 @@ void AppSettings::applyLanguage(QLocale::Language lang)
QLocale::setDefault(locale);
s_appTranslator.load(QLocale(), QStringLiteral(PROJECT_NAME), QStringLiteral("_"), QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("translations"), QStandardPaths::LocateDirectory));
- s_qtTranslator.load(QLocale(), QStringLiteral("qt"), QStringLiteral("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ s_qtTranslator.load(QLocale(), QStringLiteral("qt"), QStringLiteral("_"), QLatin1String("@qttranslations@/translations"));
s_appTranslator.load(locale, QStringLiteral(PROJECT_NAME), QStringLiteral("_"), QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("translations"), QStandardPaths::LocateDirectory));
- s_qtTranslator.load(locale, QStringLiteral("qtbase"), QStringLiteral("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ s_qtTranslator.load(locale, QStringLiteral("qtbase"), QStringLiteral("_"), QLatin1String("@qttranslations@/translations"));
}
QLocale::Language AppSettings::defaultLanguage()

View file

@ -1,5 +1,6 @@
{ lib, fetchurl, stdenv, gettext, pkg-config, glib, gtk2, libX11, libSM, libICE, which
, IOKit ? null }:
, IOKit, copyDesktopItems, makeDesktopItem, wrapGAppsHook
}:
with lib;
@ -11,7 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "01lccz4fga40isv09j8rjgr0qy10rff9vj042n6gi6gdv4z69q0y";
};
nativeBuildInputs = [ pkg-config which ];
nativeBuildInputs = [ copyDesktopItems pkg-config which wrapGAppsHook ];
buildInputs = [gettext glib gtk2 libX11 libSM libICE]
++ optionals stdenv.isDarwin [ IOKit ];
@ -19,7 +20,7 @@ stdenv.mkDerivation rec {
# Makefiles are patched to fix references to `/usr/X11R6' and to add
# `-lX11' to make sure libX11's store path is in the RPATH.
patchPhase = ''
postPatch = ''
echo "patching makefiles..."
for i in Makefile src/Makefile server/Makefile
do
@ -30,6 +31,23 @@ stdenv.mkDerivation rec {
makeFlags = [ "STRIP=-s" ];
installFlags = [ "DESTDIR=$(out)" ];
# This icon is used by the desktop file.
postInstall = ''
install -Dm444 -T src/icon.xpm $out/share/pixmaps/gkrellm.xpm
'';
desktopItems = [
(makeDesktopItem {
name = "gkrellm";
exec = "gkrellm";
icon = "gkrellm";
desktopName = "GKrellM";
genericName = "System monitor";
comment = "The GNU Krell Monitors";
categories = "System;Monitor;";
})
];
meta = {
description = "Themeable process stack of system monitors";
longDescription = ''
@ -40,7 +58,7 @@ stdenv.mkDerivation rec {
homepage = "http://gkrellm.srcbox.net";
license = licenses.gpl3Plus;
maintainers = [ ];
maintainers = with maintainers; [ khumba ];
platforms = platforms.linux;
};
}

View file

@ -1,75 +0,0 @@
{stdenv, fetchurl,
zlib, libpng, libjpeg, perl, expat, qt3,
libX11, libXext, libSM, libICE,
}:
stdenv.mkDerivation rec {
name = "taskjuggler-2.4.3";
src = fetchurl {
url = "http://www.taskjuggler.org/download/${name}.tar.bz2";
sha256 = "14gkxa2vwfih5z7fffbavps7m44z5bq950qndigw2icam5ks83jl";
};
buildInputs =
[zlib libpng libX11 libXext libSM libICE perl expat libjpeg]
;
patches = [ ./timezone-glibc.patch ];
preConfigure = ''
for i in $(grep -R "/bin/bash" . | sed 's/:.*//'); do
substituteInPlace $i --replace /bin/bash $(type -Pp bash)
done
for i in $(grep -R "/usr/bin/perl" . | sed 's/:.*//'); do
substituteInPlace $i --replace /usr/bin/perl ${perl}/bin/perl
done
# Fix install
for i in docs/en/Makefile.in Examples/BigProject/Common/Makefile.in Examples/BigProject/Makefile.in Examples/BigProject/Project1/Makefile.in Examples/BigProject/Project2/Makefile.in Examples/FirstProject/Makefile.in Examples/ShiftSchedule/Makefile.in; do
# Do not use variable substitution because there is some text after the last '@'
substituteInPlace $i --replace 'docprefix = @PACKAGES_DIR@' 'docprefix = $(docdir)/'
done
# Comment because the ical export need the KDE support.
for i in Examples/FirstProject/AccountingSoftware.tjp; do
substituteInPlace $i --replace "icalreport" "# icalreport"
done
for i in TestSuite/testdir TestSuite/createrefs \
TestSuite/Scheduler/Correct/Expression.sh; do
substituteInPlace $i --replace '/bin/rm' 'rm'
done
# Some tests require writing at $HOME
HOME=$TMPDIR
'';
configureFlags = [
"--without-arts" "--disable-docs"
"--x-includes=${libX11.dev}/include"
"--x-libraries=${libX11.out}/lib"
"--with-qt-dir=${qt3}"
];
preInstall = ''
mkdir -p $out/share/emacs/site-lisp/
cp Contrib/emacs/taskjug.el $out/share/emacs/site-lisp/
'';
# kde_locale is not defined when installing without kde.
installFlags = [ "kde_locale=\${out}/share/locale" ];
meta = {
homepage = "http://www.taskjuggler.org";
license = lib.licenses.gpl2;
description = "Project management tool";
longDescription = ''
TaskJuggler is a modern and powerful, Open Source project management
tool. Its new approach to project planing and tracking is more
flexible and superior to the commonly used Gantt chart editing
tools. It has already been successfully used in many projects and
scales easily to projects with hundreds of resources and thousands of
tasks.
'';
};
}

View file

@ -1,48 +0,0 @@
From the discussion in http://groups.google.com/group/taskjuggler-users/browse_thread/thread/f65a3efd4dcae2fc/a44c711a9d28ebee?show_docid=a44c711a9d28ebee
From: Chris Schlaeger <cs@kde.org>
Date: Sat, 27 Feb 2010 06:33:35 +0000 (+0100)
Subject: Try to fix time zone check for glibc 2.11.
X-Git-Url: http://www.taskjuggler.org/cgi-bin/gitweb.cgi?p=taskjuggler.git;a=commitdiff_plain;h=2382ed54f90c3c899badb3f56aaa2b3b5dba361e;hp=c666c5068312fec7db75e17d1c567d94127d1dda
Try to fix time zone check for glibc 2.11.
Reported-by: Lee <pFQh8RQn4fqB@dyweni.com>
---
diff --git a/taskjuggler/Utility.cpp b/taskjuggler/Utility.cpp
index 5e2bf21..9b7fce2 100644
--- a/taskjuggler/Utility.cpp
+++ b/taskjuggler/Utility.cpp
@@ -206,16 +206,28 @@ setTimezone(const char* tZone)
/* To validate the tZone value we call tzset(). It will convert the zone
* into a three-letter acronym in case the tZone value is good. If not, it
- * will just copy the wrong value to tzname[0] (glibc < 2.5) or fall back
- * to UTC. */
+ * will
+ * - copy the wrong value to tzname[0] (glibc < 2.5)
+ * - or fall back to UTC (glibc >= 2.5 && < 2.11)
+ * - copy the part before the '/' to tzname[0] (glibc >= 2.11).
+ */
tzset();
+ char* region = new(char[strlen(tZone) + 1]);
+ region[0] = 0;
+ if (strchr(tZone, '/'))
+ {
+ strcpy(region, tZone);
+ *strchr(region, '/') = 0;
+ }
if (timezone2tz(tZone) == 0 &&
- (strcmp(tzname[0], tZone) == 0 ||
+ (strcmp(tzname[0], tZone) == 0 || strcmp(tzname[0], region) == 0 ||
(strcmp(tZone, "UTC") != 0 && strcmp(tzname[0], "UTC") == 0)))
{
UtilityError = QString(i18n("Illegal timezone '%1'")).arg(tZone);
+ delete region;
return false;
}
+ delete region;
if (!LtHashTab)
return true;

View file

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "tickrs";
version = "0.10.2";
version = "0.11.0";
src = fetchFromGitHub {
owner = "tarkah";
repo = pname;
rev = "v${version}";
sha256 = "sha256-kX5Vp+yNlzBj1ewm7zNtpmbk5B2OQi0nrUNV7l6XUH0=";
sha256 = "sha256-Hx/9WW94rDAjlSZoUz5/43MQ6830OELLogRvHTbmWv0=";
};
cargoSha256 = "sha256-X7ULfb2+9l8ik12SwWCTdUfki6xbk8pCnFaiEvCwYGw=";
cargoSha256 = "sha256-TYDNx1TNGcREaeHXaejTeMDEITTTUrHCrExZYa+MSHg=";
nativeBuildInputs = [ perl ];

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj, libpng, openjpeg } :
{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, bzip2, qtbase, qttools, libnova, proj, libpng, openjpeg }:
stdenv.mkDerivation rec {
version = "1.2.6.1";
@ -13,26 +13,29 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
buildInputs = [ bzip2 qtbase libnova proj openjpeg libpng ];
cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-2.3" ]
cmakeFlags = [ "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/openjpeg-${lib.versions.majorMinor openjpeg.version}" ]
++ lib.optionals stdenv.isDarwin [ "-DLIBNOVA_LIBRARY=${libnova}/lib/libnova.dylib" ];
postInstall = if stdenv.isDarwin then ''
mkdir -p "$out/Applications" "$out/XyGrib/XyGrib.app/Contents/Resources"
cp "../data/img/xyGrib.icns" "$out/XyGrib/XyGrib.app/Contents/Resources/xyGrib.icns"
mv $out/XyGrib/XyGrib.app $out/Applications
wrapQtApp "$out/Applications/XyGrib.app/Contents/MacOS/XyGrib"
'' else ''
wrapQtApp $out/XyGrib/XyGrib
mkdir -p $out/bin
ln -s $out/XyGrib/XyGrib $out/bin/xygrib
'';
postInstall =
if stdenv.isDarwin then ''
mkdir -p "$out/Applications" "$out/XyGrib/XyGrib.app/Contents/Resources"
cp "../data/img/xyGrib.icns" "$out/XyGrib/XyGrib.app/Contents/Resources/xyGrib.icns"
mv $out/XyGrib/XyGrib.app $out/Applications
wrapQtApp "$out/Applications/XyGrib.app/Contents/MacOS/XyGrib"
'' else ''
wrapQtApp $out/XyGrib/XyGrib
mkdir -p $out/bin
ln -s $out/XyGrib/XyGrib $out/bin/xygrib
'';
meta = with lib; {
homepage = "https://opengribs.org";
description = "Weather Forecast Visualization";
longDescription = ''XyGrib is a leading opensource weather visualization package.
It interacts with OpenGribs's Grib server providing a choice
of global and large area atmospheric and wave models.'';
longDescription = ''
XyGrib is a leading opensource weather visualization package.
It interacts with OpenGribs's Grib server providing a choice
of global and large area atmospheric and wave models.
'';
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ j03 SuperSandro2000 ];

View file

@ -1,8 +1,8 @@
{
"stable": {
"version": "88.0.4324.150",
"sha256": "1hrqrggg4g1hjmaajbpydwsij2mfkfj5ccs1lj76nv4qj91yj4mf",
"sha256bin64": "0xyhvhppxk95clk6vycg2yca1yyzpi13rs3lhs4j9a482api6ks0",
"version": "88.0.4324.182",
"sha256": "10av060ix6lgsvv99lyvyy03r0m3zwdg4hddbi6dycrdxk1iyh9h",
"sha256bin64": "1rjg23xiybpnis93yb5zkvglm3r4fds9ip5mgl6f682z5x0yj05b",
"deps": {
"gn": {
"version": "2020-11-05",

View file

@ -1,38 +1,53 @@
{ lib, stdenv, fetchurl }:
let
version = "0.16.3";
{ lib, stdenv, fetchzip }:
system = stdenv.hostPlatform.system;
let
inherit (stdenv.hostPlatform) system;
suffix = {
x86_64-linux = "Linux-64bit";
aarch64-linux = "Linux-arm64";
x86_64-darwin = "macOS-64bit";
}."${system}" or (throw "Unsupported system: ${system}");
baseurl = "https://github.com/vmware-tanzu/octant/releases/download";
fetchsrc = sha256: fetchurl {
url = "${baseurl}/v${version}/octant_${version}_${suffix}.tar.gz";
sha256 = sha256."${system}";
};
fetchsrc = version: sha256: fetchzip {
url = "${baseurl}/v${version}/octant_${version}_${suffix}.tar.gz";
sha256 = sha256."${system}";
};
in
stdenv.mkDerivation rec {
pname = "octant";
inherit version;
version = "0.17.0";
src = fetchsrc {
x86_64-linux = "1c6v7d8i494k32b0zrjn4fn1idza95r6h99c33c5za4hi7gqvy0x";
aarch64-linux = "153jd4wsq8qc598w7y4d30dy20ljyhrl68cc3pig1p712l5258zs";
x86_64-darwin = "0y2qjdlyvhrzwg0fmxsr3jl39kd13276a7wg0ndhdjfwxvdwpxkz";
src = fetchsrc version {
x86_64-linux = "sha256-kYS8o97HBjNgwmrG4fjsqFWxZy6ATFOhxt6j3KMZbEc=";
aarch64-linux = "sha256-/Tpna2Y8+PQt+SeOJ9NDweRWGiQXU/sN+Wh/vLYQPwM=";
x86_64-darwin = "sha256-aOUmnD+l/Cc5qTiHxFLBjCatszmPdUc4YYZ6Oy5DT3U=";
};
doCheck = false;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p "$out/bin"
mv octant $out/bin
runHook preInstall
install -D octant $out/bin/octant
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/octant --help
$out/bin/octant version | grep "${version}"
runHook postInstallCheck
'';
dontPatchELF = true;
dontPatchShebangs = true;
passthru.updateScript = ./update.sh;
meta = with lib; {
homepage = "https://octant.dev/";
changelog = "https://github.com/vmware-tanzu/octant/blob/v${version}/CHANGELOG.md";
description = "Highly extensible platform for developers to better understand the complexity of Kubernetes clusters.";
longDescription = ''
Octant is a tool for developers to understand how applications run on a Kubernetes cluster.
@ -40,9 +55,8 @@ stdenv.mkDerivation rec {
Octant offers a combination of introspective tooling, cluster navigation, and object management along with a
plugin system to further extend its capabilities.
'';
homepage = "https://octant.dev/";
license = licenses.asl20;
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
maintainers = with maintainers; [ jk ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
};
}

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "starboard-octant-plugin";
version = "0.9.1";
version = "0.9.2";
src = fetchFromGitHub {
owner = "aquasecurity";
repo = pname;
rev = "v${version}";
sha256 = "sha256-u+yxAGVVFsZpiexToNDUfQATsYOkKWHkYF9roK0OInY=";
sha256 = "sha256-wis2ECCVXQeD7GiCMJQai+wDM8QJ1j5dPnE5O/I3wpM=";
};
vendorSha256 = "sha256-c5sel3xs4npTENqRQu8d9hUOK1OFQodF3M0ZpUpr1po=";
vendorSha256 = "sha256-T0wDbAl5GXphZIBrM36OwRCojnJ/cbXNqsjtCzUDZ6s=";
buildFlagsArray = [ "-ldflags=" "-s" "-w" ];

View file

@ -0,0 +1,38 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused gawk nix-prefetch
set -euo pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
NIX_DRV="$ROOT/default.nix"
if [ ! -f "$NIX_DRV" ]; then
echo "ERROR: cannot find default.nix in $ROOT"
exit 1
fi
fetch_arch() {
VER="$1"; ARCH="$2"
URL="https://github.com/vmware-tanzu/octant/releases/download/v${VER}/octant_${VER}_${ARCH}.tar.gz"
nix-prefetch "{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = \"octant\"; version = \"${VER}\";
src = fetchzip { url = \"$URL\"; };
}
"
}
replace_sha() {
sed -i "s#$1 = \"sha256-.\{44\}\"#$1 = \"$2\"#" "$NIX_DRV"
}
OCTANT_VER=$(curl -Ls -w "%{url_effective}" -o /dev/null https://github.com/vmware-tanzu/octant/releases/latest | awk -F'/' '{print $NF}' | sed 's/v//')
OCTANT_LINUX_X64_SHA256=$(fetch_arch "$OCTANT_VER" "Linux-64bit")
OCTANT_DARWIN_X64_SHA256=$(fetch_arch "$OCTANT_VER" "Linux-arm64")
OCTANT_LINUX_AARCH64_SHA256=$(fetch_arch "$OCTANT_VER" "macOS-64bit")
sed -i "s/version = \".*\"/version = \"$OCTANT_VER\"/" "$NIX_DRV"
replace_sha "x86_64-linux" "$OCTANT_LINUX_X64_SHA256"
replace_sha "x86_64-darwin" "$OCTANT_LINUX_AARCH64_SHA256"
replace_sha "aarch64-linux" "$OCTANT_DARWIN_X64_SHA256"

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "terragrunt";
version = "0.28.4";
version = "0.28.5";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = pname;
rev = "v${version}";
sha256 = "sha256-LilIwg3Zu7Zi7AhJeW0j2qUmSOGy1HHjvvB07FUcEeI=";
sha256 = "sha256-LSUWEgCajIBgRPiuvGJ9I3tJLXk1JrVDDsgS7lpbVYk=";
};
vendorSha256 = "sha256-lRJerUYafpkXAGf8MEM8SeG3aB86mlMo7iLpeHFAnd4=";

View file

@ -5,13 +5,13 @@ buildGoModule rec {
/* Do not use "dev" as a version. If you do, Tilt will consider itself
running in development environment and try to serve assets from the
source tree, which is not there once build completes. */
version = "0.18.8";
version = "0.18.9";
src = fetchFromGitHub {
owner = "tilt-dev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-ICJrY4XUrxVeZlMx69SB/ounfIwLFSguf9bhLOpYP3E=";
sha256 = "sha256-bsLqTpBhYeDMAv8vmnbjz+bmkyGqX3V7OkOwCprftC0=";
};
vendorSha256 = null;

View file

@ -15,6 +15,8 @@ buildGoModule rec {
subPackages = [ "." ];
buildFlagsArray = [ "-ldflags=-s -w" ];
meta = with lib; {
description = "Synchronize your DNS to multiple providers from a simple DSL";
homepage = "https://stackexchange.github.io/dnscontrol/";

View file

@ -1,5 +1,4 @@
{ lib
, callPackage
, fetchFromGitHub
, gettext
, xorg # for lndir
@ -24,13 +23,13 @@
python3Packages.buildPythonApplication rec {
pname = "mailnag";
version = "2.1.0";
version = "2.2.0";
src = fetchFromGitHub {
owner = "pulb";
repo = "mailnag";
rev = "v${version}";
sha256 = "08jqs3v01a9gkjca9xgjidhdgvnlm4541z9bwh9m3k5p2g76sz96";
sha256 = "0m1cyzwzm7z4p2v31dx098a1iar7dbilwyjcxiqnjx05nlmiqvgf";
};
buildInputs = [

View file

@ -1,27 +1,40 @@
{ lib, stdenv, fetchFromGitHub
, meson, ninja, pkg-config, python3, sphinx
, acl, curl, fuse, libselinux, udev, xz, zstd
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, python3
, sphinx
, acl
, curl
, fuse
, libselinux
, udev
, xz
, zstd
, fuseSupport ? true
, selinuxSupport ? true
, udevSupport ? true
, glibcLocales, rsync
, glibcLocales
, rsync
}:
stdenv.mkDerivation {
pname = "casync";
version = "2-219-ga8f6c84";
version = "2-226-gbd8898e";
src = fetchFromGitHub {
owner = "systemd";
repo = "casync";
rev = "a8f6c841ccfe59ca8c68aad64df170b64042dce8";
sha256 = "1i3c9wmpabpmx2wfbcyabmwfa66vz92iq5dlbm89v5mvgavz7bws";
owner = "systemd";
repo = "casync";
rev = "bd8898ed92685e12022dd33a04c87786b5262344";
sha256 = "04ibglizjzyd7ih13q6m7ic78n0mzw9nfmb3zd1fcm9j62qlq11i";
};
buildInputs = [ acl curl xz zstd ]
++ lib.optionals (fuseSupport) [ fuse ]
++ lib.optionals (selinuxSupport) [ libselinux ]
++ lib.optionals (udevSupport) [ udev ];
++ lib.optionals (fuseSupport) [ fuse ]
++ lib.optionals (selinuxSupport) [ libselinux ]
++ lib.optionals (udevSupport) [ udev ];
nativeBuildInputs = [ meson ninja pkg-config python3 sphinx ];
checkInputs = [ glibcLocales rsync ];
@ -34,8 +47,8 @@ stdenv.mkDerivation {
PKG_CONFIG_UDEV_UDEVDIR = "lib/udev";
mesonFlags = lib.optionals (!fuseSupport) [ "-Dfuse=false" ]
++ lib.optionals (!udevSupport) [ "-Dudev=false" ]
++ lib.optionals (!selinuxSupport) [ "-Dselinux=false" ];
++ lib.optionals (!udevSupport) [ "-Dudev=false" ]
++ lib.optionals (!selinuxSupport) [ "-Dselinux=false" ];
doCheck = true;
preCheck = ''
@ -44,9 +57,9 @@ stdenv.mkDerivation {
meta = with lib; {
description = "Content-Addressable Data Synchronizer";
homepage = "https://github.com/systemd/casync";
license = licenses.lgpl21;
platforms = platforms.linux;
homepage = "https://github.com/systemd/casync";
license = licenses.lgpl21Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ flokli ];
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python
{ stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python3
, texinfo, gnused, usePython ? true }:
stdenv.mkDerivation rec {
@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
buildInputs = [
(boost.override { enablePython = usePython; })
gmp mpfr libedit python gnused
(boost.override { enablePython = usePython; python = python3; })
gmp mpfr libedit python3 gnused
];
nativeBuildInputs = [ cmake texinfo ];
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
# however, that would write to a different nixstore path, pass our own sitePackages location
prePatch = lib.optionalString usePython ''
substituteInPlace src/CMakeLists.txt \
--replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${python.sitePackages}"'
--replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${python3.sitePackages}"'
'';
installTargets = [ "doc" "install" ];

View file

@ -1,13 +1,10 @@
{ lib
, python3Packages
, wrapGAppsHook
, xvfb_run
, gtk3
, gobject-introspection
, libcanberra-gtk3
, dbus
, poppler_gi
, python3
}:
python3Packages.buildPythonApplication rec {

View file

@ -1,17 +1,17 @@
{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config, python3Packages
, boost, rapidjson, qtbase, qtsvg, igraph, spdlog, wrapQtAppsHook
, fmt, graphviz, llvmPackages ? null
, fmt, graphviz, llvmPackages, z3
}:
stdenv.mkDerivation rec {
version = "3.1.9";
version = "3.2.5";
pname = "hal-hardware-analyzer";
src = fetchFromGitHub {
owner = "emsec";
repo = "hal";
rev = "v${version}";
sha256 = "0yvvlx0hq73x20va4csa8kyx3x4z648s6l6qqirzjpmxa1w91xc6";
sha256 = "0hc10wbngh4gfiiy9ndkf1y6dclcgy38x1n9k5wpvmf13vdah3zy";
};
# make sure bundled dependencies don't get in the way - install also otherwise
# copies them in full to the output, bloating the package
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ cmake ninja pkg-config ];
buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog fmt graphviz wrapQtAppsHook ]
buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog fmt graphviz wrapQtAppsHook z3 ]
++ (with python3Packages; [ python pybind11 ])
++ lib.optional stdenv.cc.isClang llvmPackages.openmp;

View file

@ -13,13 +13,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "terminator";
version = "1.92";
version = "2.1.0";
src = fetchFromGitHub {
owner = "gnome-terminator";
repo = "terminator";
rev = "v${version}";
sha256 = "105f660wzf9cpn24xzwaaa09igg5h3qhchafv190v5nqck6g1ssh";
sha256 = "sha256-Rd5XieB7K2BkSzrAr6Kmoa30xuwvsGKpPrsG2wrU1o8=";
};
nativeBuildInputs = [
@ -27,6 +27,7 @@ python3.pkgs.buildPythonApplication rec {
intltool
gobject-introspection
wrapGAppsHook
python3.pkgs.pytestrunner
];
buildInputs = [
@ -47,19 +48,13 @@ python3.pkgs.buildPythonApplication rec {
];
postPatch = ''
patchShebangs run_tests tests po
patchShebangs tests po
# dbus-python is correctly passed in propagatedBuildInputs, but for some reason setup.py complains.
# The wrapped terminator has the correct path added, so ignore this.
substituteInPlace setup.py --replace "'dbus-python'," ""
'';
checkPhase = ''
runHook preCheck
./run_tests
runHook postCheck
'';
doCheck = false;
meta = with lib; {
description = "Terminal emulator with support for tiling and tabs";

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, buildGoModule
, srht, redis, celery, pyyaml, markdown }:

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, srht, pyyaml, PyGithub }:
buildPythonPackage rec {

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, buildGoModule
, srht, minio, pygit2, scmsrht }:

View file

@ -1,5 +1,4 @@
{ lib, fetchhg, buildPythonPackage
, python
, srht, hglib, scmsrht, unidiff }:
buildPythonPackage rec {

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, srht }:
buildPythonPackage rec {

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, srht, asyncpg, aiosmtpd, pygit2, emailthreads }:
buildPythonPackage rec {

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, srht, pygit2 }:
buildPythonPackage rec {

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, buildGoModule
, pgpy, srht, redis, bcrypt, qrcode, stripe, zxcvbn, alembic, pystache
, sshpubkeys, weasyprint }:

View file

@ -1,5 +1,4 @@
{ lib, fetchgit, buildPythonPackage
, python
, srht, pyyaml }:
buildPythonPackage rec {

View file

@ -1,7 +1,6 @@
{ lib, fetchgit, buildPythonPackage
, python
, srht, redis, alembic, pystache
, pytest, factory_boy, writeText }:
, pytest, factory_boy }:
buildPythonPackage rec {
pname = "todosrht";

View file

@ -1,6 +1,7 @@
{ stdenv, lib, edk2, util-linux, nasm, iasl
, csmSupport ? false, seabios ? null
, secureBoot ? false
, httpSupport ? false
}:
assert csmSupport -> seabios != null;
@ -30,7 +31,8 @@ edk2.mkDerivation projectDscPath {
buildFlags =
lib.optional secureBoot "-DSECURE_BOOT_ENABLE=TRUE"
++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ];
++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ]
++ lib.optionals httpSupport [ "-DNETWORK_HTTP_ENABLE=TRUE" "-DNETWORK_HTTP_BOOT_ENABLE=TRUE" ];
postPatch = lib.optionalString csmSupport ''
cp ${seabios}/Csm16.bin OvmfPkg/Csm/Csm16/Csm16.bin

View file

@ -43,13 +43,13 @@
stdenv.mkDerivation rec {
pname = "evince";
version = "3.38.1";
version = "3.38.2";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/evince/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "APbWaJzCLePABb2H1MLr9yAGTLjcahiHgW+LfggrLmM=";
sha256 = "J9QZ1f7WMF4HRijtz94MtzT//aIF1jysMjORwEkDvZQ=";
};
postPatch = ''

View file

@ -11,13 +11,13 @@
stdenv.mkDerivation rec {
pname = "gnome-autoar";
version = "0.2.4";
version = "0.3.0";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "mirror://gnome/sources/gnome-autoar/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0yk56ch46n3wfy633mq31kif9n7v06rlij4vqbsbn6l4z1vw6d0a";
sha256 = "0ssqckfkyldwld88zizy446y2359rg40lnrcm3sjpjhc2b015hgj";
};
passthru = {
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
platforms = platforms.linux;
maintainers = teams.gnome.members;
license = licenses.lgpl21;
license = licenses.lgpl21Plus;
description = "Library to integrate compressed files management with GNOME";
};
}

View file

@ -5,7 +5,7 @@
kcmutils, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons,
kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kirigami2, kpackage,
kservice, kwayland, kwidgetsaddons, kxmlgui, libraw1394, libGLU, pciutils,
solid
solid, systemsettings
}:
mkDerivation {
@ -15,6 +15,11 @@ mkDerivation {
buildInputs = [
kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
kdeclarative kdelibs4support ki18n kiconthemes kio kirigami2 kpackage
kservice kwayland kwidgetsaddons kxmlgui libraw1394 libGLU pciutils solid
kservice kwayland kwidgetsaddons kxmlgui libraw1394 libGLU pciutils solid systemsettings
];
preFixup = ''
# fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in the same directory,
# while it is actually located in a completely different store path
ln -sf ${lib.getBin systemsettings}/bin/systemsettings5 $out/bin/kinfocenter
'';
}

View file

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
stripRoot = false;
};
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
nativeBuildInputs = [ unzip bison flex gperf ];

View file

@ -0,0 +1,267 @@
{ lib, stdenv, fetchurl, tzdata, iana-etc, runCommand
, perl, which, pkg-config, patch, procps, pcre, cacert, Security, Foundation, xcbuild
, mailcap, runtimeShell
, buildPackages
, pkgsBuildTarget
, fetchpatch
, callPackage
}:
let
inherit (lib) optionals optionalString;
go_bootstrap = callPackage ./bootstrap.nix {
inherit Security;
};
goBootstrap = runCommand "go-bootstrap" {} ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
find $out -name "*.c" -delete
cp -rf $out/bin/* $out/share/go/bin/
'';
goarch = platform: {
"i686" = "386";
"x86_64" = "amd64";
"aarch64" = "arm64";
"arm" = "arm";
"armv5tel" = "arm";
"armv6l" = "arm";
"armv7l" = "arm";
"powerpc64le" = "ppc64le";
}.${platform.parsed.cpu.name} or (throw "Unsupported system");
# We need a target compiler which is still runnable at build time,
# to handle the cross-building case where build != host == target
targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
in
stdenv.mkDerivation rec {
pname = "go";
version = "1.16";
src = fetchurl {
url = "https://dl.google.com/go/go${version}.src.tar.gz";
sha256 = "0nn98xiw8zrvxf9f36p8dzc7ihrrkakr0g9jiy4haqb5alyhd23n";
};
# perl is used for testing go vet
nativeBuildInputs = [ perl which pkg-config patch procps ];
buildInputs = [ cacert pcre ]
++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
propagatedBuildInputs = optionals stdenv.isDarwin [ xcbuild ];
depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ];
hardeningDisable = [ "all" ];
prePatch = ''
patchShebangs ./ # replace /bin/bash
# This source produces shell script at run time,
# and thus it is not corrected by patchShebangs.
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
--replace '#!/usr/bin/env bash' '#!${runtimeShell}'
# Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix
sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go
# Disabling the 'os/http/net' tests (they want files not available in
# chroot builds)
rm src/net/{listen,parse}_test.go
rm src/syscall/exec_linux_test.go
# !!! substituteInPlace does not seems to be effective.
# The os test wants to read files in an existing path. Just don't let it be /usr/bin.
sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
# Fails on aarch64
sed -i '/TestFallocate/aif true \{ return\; \}' src/cmd/link/internal/ld/fallocate_test.go
# Skip this test since ssl patches mess it up.
sed -i '/TestLoadSystemCertsLoadColonSeparatedDirs/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
# Disable another PIE test which breaks.
sed -i '/TestTrivialPIE/aif true \{ return\; \}' misc/cgo/testshared/shared_test.go
# Disable the BuildModePie test
sed -i '/TestBuildmodePIE/aif true \{ return\; \}' src/cmd/go/go_test.go
# Disable the unix socket test
sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go
# Disable the hostname test
sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go
# ParseInLocation fails the test
sed -i '/TestParseInSydney/aif true \{ return\; \}' src/time/format_test.go
# Remove the api check as it never worked
sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
# Remove the coverage test as we have removed this utility
sed -i '/TestCoverageWithCgo/aif true \{ return\; \}' src/cmd/go/go_test.go
# Remove the timezone naming test
sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go
# Remove disable setgid test
sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go
# Remove cert tests that conflict with NixOS's cert resolution
sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
# TestWritevError hangs sometimes
sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go
# TestVariousDeadlines fails sometimes
sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_test.go
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
# Disable cgo lookup tests not works, they depend on resolver
rm src/net/cgo_unix_test.go
'' + optionalString stdenv.isLinux ''
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
'' + optionalString stdenv.isAarch32 ''
echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
'' + optionalString stdenv.isDarwin ''
substituteInPlace src/race.bash --replace \
"sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
sed -i '/TestChdirAndGetwd/aif true \{ return\; \}' src/os/os_test.go
sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go
sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go
sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go
sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go
sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go
sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
# TestCurrent fails because Current is not implemented on Darwin
sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
'';
patches = [
./remove-tools-1.11.patch
./ssl-cert-file-1.16.patch
./remove-test-pie-1.15.patch
./creds-test.patch
./go-1.9-skip-flaky-19608.patch
./go-1.9-skip-flaky-20072.patch
./skip-external-network-tests-1.16.patch
./skip-nohup-tests.patch
./skip-cgo-tests-1.15.patch
./go_no_vendor_checks-1.16.patch
] ++ [
# breaks under load: https://github.com/golang/go/issues/25628
(if stdenv.isAarch32
then ./skip-test-extra-files-on-aarch32-1.14.patch
else ./skip-test-extra-files-on-386-1.14.patch)
];
postPatch = ''
find . -name '*.orig' -exec rm {} ';'
'';
GOOS = stdenv.targetPlatform.parsed.kernel.name;
GOARCH = goarch stdenv.targetPlatform;
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
# Go will nevertheless build a for host system that we will copy over in
# the install phase.
GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name;
GOHOSTARCH = goarch stdenv.buildPlatform;
# {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
# to be different from CC/CXX
CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}cc"
else
null;
CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
"${targetCC}/bin/${targetCC.targetPrefix}c++"
else
null;
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
# Hopefully avoids test timeouts on Hydra
GO_TEST_TIMEOUT_SCALE = 3;
# Indicate that we are running on build infrastructure
# Some tests assume things like home directories and users exists
GO_BUILDER_NAME = "nix";
GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
postConfigure = ''
export GOCACHE=$TMPDIR/go-cache
# this is compiled into the binary
export GOROOT_FINAL=$out/share/go
export PATH=$(pwd)/bin:$PATH
${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) ''
# Independent from host/target, CC should produce code for the building system.
# We only set it when cross-compiling.
export CC=${buildPackages.stdenv.cc}/bin/cc
''}
ulimit -a
'';
postBuild = ''
(cd src && ./make.bash)
'';
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
checkPhase = ''
runHook preCheck
(cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
runHook postCheck
'';
preInstall = ''
rm -r pkg/obj
# Contains the wrong perl shebang when cross compiling,
# since it is not used for anything we can deleted as well.
rm src/regexp/syntax/make_perl_groups.pl
'' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then ''
mv bin/*_*/* bin
rmdir bin/*_*
${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH}
''}
'' else if (stdenv.hostPlatform != stdenv.targetPlatform) then ''
rm -rf bin/*_*
${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH}
''}
'' else "");
installPhase = ''
runHook preInstall
mkdir -p $GOROOT_FINAL
cp -a bin pkg src lib misc api doc $GOROOT_FINAL
ln -s $GOROOT_FINAL/bin $out/bin
runHook postInstall
'';
disallowedReferences = [ goBootstrap ];
meta = with lib; {
homepage = "http://golang.org/";
description = "The Go Programming language";
license = licenses.bsd3;
maintainers = teams.golang.members;
platforms = platforms.linux ++ platforms.darwin;
};
}

View file

@ -0,0 +1,23 @@
Starting from go1.14, go verifes that vendor/modules.txt matches the requirements
and replacements listed in the main module go.mod file, and it is a hard failure if
vendor/modules.txt is missing.
Relax module consistency checks and switch back to pre go1.14 behaviour if
vendor/modules.txt is missing regardless of go version requirement in go.mod.
This has been ported from FreeBSD: https://reviews.freebsd.org/D24122
See https://github.com/golang/go/issues/37948 for discussion.
diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
index d8fd91f1fe..8bc08e6fed 100644
--- a/src/cmd/go/internal/modload/vendor.go
+++ b/src/cmd/go/internal/modload/vendor.go
@@ -133,7 +133,7 @@ func checkVendorConsistency() {
readVendorList()
pre114 := false
- if semver.Compare(index.goVersionV, "v1.14") < 0 {
+ if semver.Compare(index.goVersionV, "v1.14") < 0 || (os.Getenv("GO_NO_VENDOR_CHECKS") == "1" && len(vendorMeta) == 0) {
// Go versions before 1.14 did not include enough information in
// vendor/modules.txt to check for consistency.
// If we know that we're on an earlier version, relax the consistency check.

View file

@ -0,0 +1,33 @@
diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
index c902b1404f..66016088a2 100644
--- a/src/internal/testenv/testenv.go
+++ b/src/internal/testenv/testenv.go
@@ -163,13 +163,15 @@ func MustHaveExecPath(t testing.TB, path string) {
// HasExternalNetwork reports whether the current system can use
// external (non-localhost) networks.
func HasExternalNetwork() bool {
- return !testing.Short() && runtime.GOOS != "js"
+ // Nix sandbox does not external network in sandbox
+ return false
}
// MustHaveExternalNetwork checks that the current system can use
// external (non-localhost) networks.
// If not, MustHaveExternalNetwork calls t.Skip with an explanation.
func MustHaveExternalNetwork(t testing.TB) {
+ t.Skipf("Nix sandbox does not have networking")
if runtime.GOOS == "js" {
t.Skipf("skipping test: no external network on %s", runtime.GOOS)
}
diff --git a/src/net/dial_test.go b/src/net/dial_test.go
index 57cf5554ad..d00be53b2c 100644
--- a/src/net/dial_test.go
+++ b/src/net/dial_test.go
@@ -990,6 +990,7 @@ func TestDialerControl(t *testing.T) {
// except that it won't skip testing on non-mobile builders.
func mustHaveExternalNetwork(t *testing.T) {
t.Helper()
+ t.Skipf("Nix sandbox does not have networking")
mobile := runtime.GOOS == "android" || runtime.GOOS == "ios"
if testenv.Builder() == "" || mobile {
testenv.MustHaveExternalNetwork(t)

View file

@ -0,0 +1,34 @@
diff --git a/src/crypto/x509/root.go b/src/crypto/x509/root.go
index ac92915128..fb1d70c735 100644
--- a/src/crypto/x509/root.go
+++ b/src/crypto/x509/root.go
@@ -6,7 +6,11 @@ package x509
//go:generate go run root_ios_gen.go -version 55161.140.3
-import "sync"
+import (
+ "io/ioutil"
+ "os"
+ "sync"
+)
var (
once sync.Once
@@ -20,6 +24,16 @@ func systemRootsPool() *CertPool {
}
func initSystemRoots() {
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
+ data, err := ioutil.ReadFile(file)
+ if err == nil {
+ roots := NewCertPool()
+ roots.AppendCertsFromPEM(data)
+ systemRoots = roots
+ return
+ }
+ }
+
systemRoots, systemRootsErr = loadSystemRoots()
if systemRootsErr != nil {
systemRoots = nil

View file

@ -7,45 +7,45 @@ let
javaVersionPlatform = "${javaVersion}-${platform}";
graalvmXXX-ce = stdenv.mkDerivation rec {
pname = "graalvm${javaVersion}-ce";
version = "20.3.0";
version = "21.0.0";
srcs = [
(fetchurl {
sha256 = { "8-linux-amd64" = "195b20ivvv8ipjn3qq2313j8qf96ji93pqm99nvn20bq23wasp25";
"11-linux-amd64" = "1mdk1zhazvvh1fa01bzi5v5fxhvx592xmbakx0y1137vykbayyjm";
"8-darwin-amd64" = "1rrs471204p71knyxpjxymdi8ws98ph2kf5j0knk529g0d24rs01";
"11-darwin-amd64" = "008dl8dbf37mv4wahb9hbd6jp8svvmpy1rgsiqkn3i4hypxnkf12";
sha256 = { "8-linux-amd64" = "18q1plrpclp02rlwn3vvv2fcyspvqv2gkzn14f0b59pnladmlv1j";
"11-linux-amd64" = "1g1xjbr693rimdy2cy6jvz4vgnbnw76wa87xcmaszka206fmpnsc";
"8-darwin-amd64" = "0giv8f7ybdykadzmxjy91i6njbdx6dclyx7g6vyhwk2l1cvxi4li";
"11-darwin-amd64" = "1a8gjp6fp11ms05pd62h1x1ifkkr3wv0hrxic670v90bbps9lsqf";
}.${javaVersionPlatform};
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/graalvm-ce-java${javaVersionPlatform}-${version}.tar.gz";
})
(fetchurl {
sha256 = { "8-linux-amd64" = "1rzbhllz28x5ps8n304v998hykr4m8z1gfg53ybi6laxhkbx3i13";
"11-linux-amd64" = "09ipdl1489xnbckwl6sl9y7zy7kp5qf5fgf3kgz5d69jrk2z6rvf";
"8-darwin-amd64" = "1iy2943jbrarh8bm9wy15xk7prnskqwik2ham07a6ybp4j4b81xi";
"11-darwin-amd64" = "0vk2grlirghzc78kvwg66w0xriy5p8qkcp7qx83i62d7sj0kvwnf";
sha256 = { "8-linux-amd64" = "0hpq2g9hc8b7j4d8a08kq1mnl6pl7a4kwaj0a3gka3d4m6r7cscg";
"11-linux-amd64" = "0z3hb2bf0lqzw760civ3h1wvx22a75n7baxc0l2i9h5wxas002y7";
"8-darwin-amd64" = "1izbgl4hjg5jyi422xnkx006qnw163r1i1djf76q1plms40y01ph";
"11-darwin-amd64" = "1d9z75gil0if74ndla9yw3xx9i2bfbcs32qa0z6wi5if66cmknb8";
}.${javaVersionPlatform};
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/native-image-installable-svm-java${javaVersionPlatform}-${version}.jar";
})
(fetchurl {
sha256 = { "8-linux-amd64" = "0v98v44vblhyi3jhrngmvrkb3a6d607x4fpmrb4mrrsg75vbvc6d";
"11-linux-amd64" = "0kb9472ilwqg40gyw1c4lmzkd9s763raw560sw80ljm3p75k4sc7";
"8-darwin-amd64" = "192n9ckr4p8qirpxr67ji3wzxpng33yfr7kxynlrcp7b3ghfic6p";
"11-darwin-amd64" = "1wqdk8wphywa00kl3xikiskclb84rx3nw5a4vi5y2n060kclcp22";
sha256 = { "8-linux-amd64" = "122p8psgmzhqnjb2fy1lwghg0kw5qa8xkzgyjp682lwg4j8brz43";
"11-linux-amd64" = "1vdc90m6s013cbhmj58nb4vyxllbxirw0idlgv0iv9cyhx90hzgz";
"8-darwin-amd64" = "04q0s9xsaskqn9kbhz0mgdk28j2qnxrzqfmw6jn2znr8s8jsc6yp";
"11-darwin-amd64" = "1pw4xd8g5cc9bm52awmm1zxs96ijws43vws7y10wxa6a0nhv7z5f";
}.${javaVersionPlatform};
url = "https://github.com/oracle/truffleruby/releases/download/vm-${version}/ruby-installable-svm-java${javaVersionPlatform}-${version}.jar";
})
(fetchurl {
sha256 = { "8-linux-amd64" = "1iskmkhrrwlhcq92g1ljvsfi9q403xxkwgzn9m282z5llh2fxv74";
"11-linux-amd64" = "13bg2gs22rzbngnbw8j68jqgcknbiw30kpxac5jjcn55rf2ymvkz";
"8-darwin-amd64" = "08pib13q7s5wymnbykkyif66ll146vznxw4yz12qwhb419882jc7";
"11-darwin-amd64" = "0cb9lhc21yr2dnrm4kwa68laaczvsdnzpcbl2qix50d0v84xl602";
sha256 = { "8-linux-amd64" = "19m7n4f5jrmsfvgv903sarkcjh55l0nlnw99lvjlcafw5hqzyb91";
"11-linux-amd64" = "18ibb7l7b4hmbnvyr8j7mrs11mvlsf2j0c8rdd2s93x2114f26ba";
"8-darwin-amd64" = "1zlzi00339kvg4ym2j75ypfkzn8zbwdpriqmkaz4fh28qjmc1dwq";
"11-darwin-amd64" = "0x301i1fimakhi2x29ldr0fsqkb3qs0g9jsmjv27d62dpqx8kgc8";
}.${javaVersionPlatform};
url = "https://github.com/graalvm/graalpython/releases/download/vm-${version}/python-installable-svm-java${javaVersionPlatform}-${version}.jar";
})
(fetchurl {
sha256 = { "8-linux-amd64" = "12lvcl1vmc35wh3xw5dqca7yiijsd432x4lim3knzppipy7fmflq";
"11-linux-amd64" = "1s8zfgjyyw6w53974h9a2ig8a1bvc97aplyrdziywfrijgp6zkqk";
"8-darwin-amd64" = "06i1n42hkhcf1pfb2bly22ws4a09xgydsgh8b0kvjmb1fapd4paq";
"11-darwin-amd64" = "1r2bqhfxnw09izxlsc562znlp3m9c1isqzhlki083h3vp548vv9s";
sha256 = { "8-linux-amd64" = "0dlgbg6kri89r9zbk6n0ch3g8356j1g35bwjng87c2y5y0vcw0b5";
"11-linux-amd64" = "1yby65hww6zmd2g5pjwbq5pv3iv4gfv060b8fq75fjhwrisyj5gd";
"8-darwin-amd64" = "1smdj491g23i3z7p5rybid18nnz8bphrqjkv0lg2ffyrpn8k6g93";
"11-darwin-amd64" = "056zyn0lpd7741k1szzjwwacka0g7rn0j4ypfmav4h1245mjg8lx";
}.${javaVersionPlatform};
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/wasm-installable-svm-java${javaVersionPlatform}-${version}.jar";
})
@ -146,8 +146,8 @@ let
'';
postFixup = ''
rpath="${ { "8" = "$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64";
"11" = "$out/lib/jli:$out/lib/server:$out/lib";
rpath="${ { "8" = "$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64:$out/jre/languages/ruby/lib/cext";
"11" = "$out/lib/jli:$out/lib/server:$out/lib:$out/languages/ruby/lib/cext";
}.${javaVersion}
}:${
lib.makeLibraryPath [
@ -204,11 +204,13 @@ let
echo '1 + 1' | $out/bin/graalpython
# TODO: `irb` on MacOS gives an error saying "Could not find OpenSSL
# headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX", even
# though `openssl` is in `propagatedBuildInputs`. For more details see:
# https://github.com/NixOS/nixpkgs/pull/105815
# echo '1 + 1' | $out/bin/irb
${lib.optionalString stdenv.isLinux ''
# TODO: `irb` on MacOS gives an error saying "Could not find OpenSSL
# headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX", even
# though `openssl` is in `propagatedBuildInputs`. For more details see:
# https://github.com/NixOS/nixpkgs/pull/105815
echo '1 + 1' | $out/bin/irb
''}
echo '1 + 1' | $out/bin/node -i
${lib.optionalString (javaVersion == "11") ''

View file

@ -1,21 +1,24 @@
{ lib, stdenv, fetchzip, vim, makeWrapper }:
{ lib, stdenv, fetchFromGitHub, makeWrapper, unixtools }:
stdenv.mkDerivation rec {
pname = "microscheme";
version = "0.9.3";
src = fetchzip {
name = "${pname}-${version}-src";
url = "https://github.com/ryansuchocki/microscheme/archive/v${version}.tar.gz";
sha256 = "1r3ng4pw1s9yy1h5rafra1rq19d3vmb5pzbpcz1913wz22qdd976";
src = fetchFromGitHub {
owner = "ryansuchocki";
repo = "microscheme";
rev = "v${version}";
sha256 = "5qTWsBCfj5DCZ3f9W1bdo6WAc1DZqVxg8D7pwC95duQ=";
};
buildInputs = [ makeWrapper vim ];
installPhase = ''
make install PREFIX=$out
postPatch = ''
substituteInPlace makefile --replace gcc ${stdenv.cc.targetPrefix}cc
'';
nativeBuildInputs = [ makeWrapper unixtools.xxd ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
homepage = "http://microscheme.org";
description = "A Scheme subset for Atmel microcontrollers";
@ -24,7 +27,7 @@ stdenv.mkDerivation rec {
microcontrollers, especially as found on Arduino boards.
'';
license = licenses.mit;
platforms = platforms.linux;
platforms = platforms.all;
maintainers = with maintainers; [ ardumont ];
};
}

View file

@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
];
makeFlags = [
"CC=cc"
"CC=${stdenv.cc.targetPrefix}cc"
"CFLAGS=-O2"
"PREFIX=${placeholder "out"}"
];
@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
postPatch = ''
patchShebangs quotehostinfo
substituteInPlace Makefile --replace strip '${stdenv.cc.targetPrefix}strip'
'';
meta = with lib; {

View file

@ -1,15 +1,15 @@
{ lib, stdenv, fetchFromGitHub, fetchurl, makeWrapper, pcre2, coreutils, which, libressl, libxml2, cmake, z3, substituteAll,
{ lib, stdenv, fetchFromGitHub, fetchurl, makeWrapper, pcre2, coreutils, which, openssl, libxml2, cmake, z3, substituteAll,
cc ? stdenv.cc, lto ? !stdenv.isDarwin }:
stdenv.mkDerivation (rec {
pname = "ponyc";
version = "0.38.1";
version = "0.38.3";
src = fetchFromGitHub {
owner = "ponylang";
repo = pname;
rev = version;
sha256 = "1hk810k9h3bl641pgw91y4x2qw67rvbapx6p2pk9qz5p7nfcn7qh";
sha256 = "14kivmyphi7gbd7mgd4cnsiwl4cl7wih8kwzh7n79s2s4c5hj4ak";
# Due to a bug in LLVM 9.x, ponyc has to include its own vendored patched
# LLVM. (The submodule is a specific tag in the LLVM source tree).
@ -24,7 +24,7 @@ stdenv.mkDerivation (rec {
};
ponygbenchmark = fetchurl {
url = https://github.com/google/benchmark/archive/v1.5.0.tar.gz;
url = "https://github.com/google/benchmark/archive/v1.5.0.tar.gz";
sha256 = "06i2cr4rj126m1zfz0x1rbxv1mw1l7a11mzal5kqk56cdrdicsiw";
name = "v1.5.0.tar.gz";
};
@ -39,7 +39,7 @@ stdenv.mkDerivation (rec {
(substituteAll {
src = ./make-safe-for-sandbox.patch;
googletest = fetchurl {
url = https://github.com/google/googletest/archive/release-1.8.1.tar.gz;
url = "https://github.com/google/googletest/archive/release-1.8.1.tar.gz";
sha256 = "17147961i01fl099ygxjx4asvjanwdd446nwbq9v8156h98zxwcv";
name = "release-1.8.1.tar.gz";
};
@ -95,7 +95,7 @@ stdenv.mkDerivation (rec {
wrapProgram $out/bin/ponyc \
--prefix PATH ":" "${stdenv.cc}/bin" \
--set-default CC "$CC" \
--prefix PONYPATH : "${lib.makeLibraryPath [ pcre2 libressl (placeholder "out") ]}"
--prefix PONYPATH : "${lib.makeLibraryPath [ pcre2 openssl (placeholder "out") ]}"
'';
# Stripping breaks linking for ponyc

View file

@ -1,114 +1,4 @@
{ lib, stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
, disableImmobileSpace ? false
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
# to get rid of ${glibc} dependency.
, purgeNixReferences ? false
, texinfo
}:
stdenv.mkDerivation rec {
pname = "sbcl";
import ./common.nix {
version = "2.0.9";
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
sha256 = "sha256:17wvrcwgp45z9b6arik31fjnz7908qhr5ackxq1y0gqi1hsh1xy4";
};
buildInputs = [texinfo];
patchPhase = ''
echo '"${version}.nixos"' > version.lisp-expr
pwd
# SBCL checks whether files are up-to-date in many places..
# Unfortunately, same timestamp is not good enough
sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
#sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
sed -i src/cold/slam.lisp -e \
'/file-write-date input/a)'
sed -i src/cold/slam.lisp -e \
'/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
sed -i src/code/target-load.lisp -e \
'/date defaulted-fasl/a)'
sed -i src/code/target-load.lisp -e \
'/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
# Fix the tests
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
# Use whatever `cc` the stdenv provides
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
substituteInPlace src/runtime/Config.x86-64-darwin \
--replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
''
+ (if purgeNixReferences
then
# This is the default location to look for the core; by default in $out/lib/sbcl
''
sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
-i src/runtime/runtime.c
''
else
# Fix software version retrieval
''
sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
src/code/run-program.lisp
''
);
preBuild = ''
export INSTALL_ROOT=$out
mkdir -p test-home
export HOME=$PWD/test-home
'';
enableFeatures = with lib;
optional threadSupport "sb-thread" ++
optional stdenv.isAarch32 "arm";
disableFeatures = with lib;
optional (!threadSupport) "sb-thread" ++
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
buildPhase = ''
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
lib.concatStringsSep " "
(builtins.map (x: "--with-${x}") enableFeatures ++
builtins.map (x: "--without-${x}") disableFeatures)
}
(cd doc/manual ; make info)
'';
installPhase = ''
INSTALL_ROOT=$out sh install.sh
''
+ lib.optionalString (!purgeNixReferences) ''
cp -r src $out/lib/sbcl
cp -r contrib $out/lib/sbcl
cat >$out/lib/sbcl/sbclrc <<EOF
(setf (logical-pathname-translations "SYS")
'(("SYS:SRC;**;*.*.*" #P"$out/lib/sbcl/src/**/*.*")
("SYS:CONTRIB;**;*.*.*" #P"$out/lib/sbcl/contrib/**/*.*")))
EOF
'';
setupHook = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
addEnvHooks "$targetOffset" _setSbclHome
_setSbclHome() {
export SBCL_HOME='@out@/lib/sbcl/'
}
'');
meta = sbclBootstrap.meta // {
inherit version;
updateWalker = true;
};
sha256 = "17wvrcwgp45z9b6arik31fjnz7908qhr5ackxq1y0gqi1hsh1xy4";
}

View file

@ -1,114 +1,4 @@
{ lib, stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
, disableImmobileSpace ? false
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
# to get rid of ${glibc} dependency.
, purgeNixReferences ? false
, texinfo
}:
stdenv.mkDerivation rec {
pname = "sbcl";
import ./common.nix {
version = "2.1.1";
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
sha256 = "sha256:15wa66sachhzgvg5n35vihmkpasg100lh561c1d1bdrql0p8kbd9";
};
buildInputs = [texinfo];
patchPhase = ''
echo '"${version}.nixos"' > version.lisp-expr
pwd
# SBCL checks whether files are up-to-date in many places..
# Unfortunately, same timestamp is not good enough
sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
#sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
sed -i src/cold/slam.lisp -e \
'/file-write-date input/a)'
sed -i src/cold/slam.lisp -e \
'/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
sed -i src/code/target-load.lisp -e \
'/date defaulted-fasl/a)'
sed -i src/code/target-load.lisp -e \
'/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
# Fix the tests
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
# Use whatever `cc` the stdenv provides
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
substituteInPlace src/runtime/Config.x86-64-darwin \
--replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
''
+ (if purgeNixReferences
then
# This is the default location to look for the core; by default in $out/lib/sbcl
''
sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
-i src/runtime/runtime.c
''
else
# Fix software version retrieval
''
sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
src/code/run-program.lisp
''
);
preBuild = ''
export INSTALL_ROOT=$out
mkdir -p test-home
export HOME=$PWD/test-home
'';
enableFeatures = with lib;
optional threadSupport "sb-thread" ++
optional stdenv.isAarch32 "arm";
disableFeatures = with lib;
optional (!threadSupport) "sb-thread" ++
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
buildPhase = ''
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
lib.concatStringsSep " "
(builtins.map (x: "--with-${x}") enableFeatures ++
builtins.map (x: "--without-${x}") disableFeatures)
}
(cd doc/manual ; make info)
'';
installPhase = ''
INSTALL_ROOT=$out sh install.sh
''
+ lib.optionalString (!purgeNixReferences) ''
cp -r src $out/lib/sbcl
cp -r contrib $out/lib/sbcl
cat >$out/lib/sbcl/sbclrc <<EOF
(setf (logical-pathname-translations "SYS")
'(("SYS:SRC;**;*.*.*" #P"$out/lib/sbcl/src/**/*.*")
("SYS:CONTRIB;**;*.*.*" #P"$out/lib/sbcl/contrib/**/*.*")))
EOF
'';
setupHook = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
addEnvHooks "$targetOffset" _setSbclHome
_setSbclHome() {
export SBCL_HOME='@out@/lib/sbcl/'
}
'');
meta = sbclBootstrap.meta // {
inherit version;
updateWalker = true;
};
sha256 = "15wa66sachhzgvg5n35vihmkpasg100lh561c1d1bdrql0p8kbd9";
}

View file

@ -0,0 +1,116 @@
{ version, sha256 }:
{ lib, stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
, disableImmobileSpace ? false
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
# to get rid of ${glibc} dependency.
, purgeNixReferences ? false
, texinfo
}:
stdenv.mkDerivation rec {
pname = "sbcl";
inherit version;
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
inherit sha256;
};
buildInputs = [texinfo];
patchPhase = ''
echo '"${version}.nixos"' > version.lisp-expr
pwd
# SBCL checks whether files are up-to-date in many places..
# Unfortunately, same timestamp is not good enough
sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
#sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
sed -i src/cold/slam.lisp -e \
'/file-write-date input/a)'
sed -i src/cold/slam.lisp -e \
'/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
sed -i src/code/target-load.lisp -e \
'/date defaulted-fasl/a)'
sed -i src/code/target-load.lisp -e \
'/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
# Fix the tests
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
# Use whatever `cc` the stdenv provides
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
substituteInPlace src/runtime/Config.x86-64-darwin \
--replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
''
+ (if purgeNixReferences
then
# This is the default location to look for the core; by default in $out/lib/sbcl
''
sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
-i src/runtime/runtime.c
''
else
# Fix software version retrieval
''
sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
src/code/run-program.lisp
''
);
preBuild = ''
export INSTALL_ROOT=$out
mkdir -p test-home
export HOME=$PWD/test-home
'';
enableFeatures = with lib;
optional threadSupport "sb-thread" ++
optional stdenv.isAarch32 "arm";
disableFeatures = with lib;
optional (!threadSupport) "sb-thread" ++
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
buildPhase = ''
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
lib.concatStringsSep " "
(builtins.map (x: "--with-${x}") enableFeatures ++
builtins.map (x: "--without-${x}") disableFeatures)
}
(cd doc/manual ; make info)
'';
installPhase = ''
INSTALL_ROOT=$out sh install.sh
''
+ lib.optionalString (!purgeNixReferences) ''
cp -r src $out/lib/sbcl
cp -r contrib $out/lib/sbcl
cat >$out/lib/sbcl/sbclrc <<EOF
(setf (logical-pathname-translations "SYS")
'(("SYS:SRC;**;*.*.*" #P"$out/lib/sbcl/src/**/*.*")
("SYS:CONTRIB;**;*.*.*" #P"$out/lib/sbcl/contrib/**/*.*")))
EOF
'';
setupHook = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
addEnvHooks "$targetOffset" _setSbclHome
_setSbclHome() {
export SBCL_HOME='@out@/lib/sbcl/'
}
'');
meta = sbclBootstrap.meta // {
inherit version;
updateWalker = true;
};
}

View file

@ -1,114 +1,4 @@
{ lib, stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
, disableImmobileSpace ? false
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
# to get rid of ${glibc} dependency.
, purgeNixReferences ? false
, texinfo
}:
stdenv.mkDerivation rec {
pname = "sbcl";
import ./common.nix {
version = "2.0.8";
src = fetchurl {
url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
sha256 = "sha256:1xwrwvps7drrpyw3wg5h3g2qajmkwqs9gz0fdw1ns9adp7vld390";
};
buildInputs = [texinfo];
patchPhase = ''
echo '"${version}.nixos"' > version.lisp-expr
pwd
# SBCL checks whether files are up-to-date in many places..
# Unfortunately, same timestamp is not good enough
sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
#sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
sed -i src/cold/slam.lisp -e \
'/file-write-date input/a)'
sed -i src/cold/slam.lisp -e \
'/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
sed -i src/code/target-load.lisp -e \
'/date defaulted-fasl/a)'
sed -i src/code/target-load.lisp -e \
'/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
# Fix the tests
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
# Use whatever `cc` the stdenv provides
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
substituteInPlace src/runtime/Config.x86-64-darwin \
--replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
''
+ (if purgeNixReferences
then
# This is the default location to look for the core; by default in $out/lib/sbcl
''
sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
-i src/runtime/runtime.c
''
else
# Fix software version retrieval
''
sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
src/code/run-program.lisp
''
);
preBuild = ''
export INSTALL_ROOT=$out
mkdir -p test-home
export HOME=$PWD/test-home
'';
enableFeatures = with lib;
optional threadSupport "sb-thread" ++
optional stdenv.isAarch32 "arm";
disableFeatures = with lib;
optional (!threadSupport) "sb-thread" ++
optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
buildPhase = ''
sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
lib.concatStringsSep " "
(builtins.map (x: "--with-${x}") enableFeatures ++
builtins.map (x: "--without-${x}") disableFeatures)
}
(cd doc/manual ; make info)
'';
installPhase = ''
INSTALL_ROOT=$out sh install.sh
''
+ lib.optionalString (!purgeNixReferences) ''
cp -r src $out/lib/sbcl
cp -r contrib $out/lib/sbcl
cat >$out/lib/sbcl/sbclrc <<EOF
(setf (logical-pathname-translations "SYS")
'(("SYS:SRC;**;*.*.*" #P"$out/lib/sbcl/src/**/*.*")
("SYS:CONTRIB;**;*.*.*" #P"$out/lib/sbcl/contrib/**/*.*")))
EOF
'';
setupHook = lib.optional purgeNixReferences (writeText "setupHook.sh" ''
addEnvHooks "$targetOffset" _setSbclHome
_setSbclHome() {
export SBCL_HOME='@out@/lib/sbcl/'
}
'');
meta = sbclBootstrap.meta // {
inherit version;
updateWalker = true;
};
sha256 = "1xwrwvps7drrpyw3wg5h3g2qajmkwqs9gz0fdw1ns9adp7vld390";
}

View file

@ -1,6 +1,5 @@
{ lib, stdenv, fetchurl, graalvm11-ce, glibcLocales }:
with lib;
stdenv.mkDerivation rec {
pname = "babashka";
version = "0.2.10";
@ -25,7 +24,7 @@ stdenv.mkDerivation rec {
native-image \
-jar ${src} \
-H:Name=bb \
${optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \
${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \
-H:+ReportExceptionStackTraces \
-J-Dclojure.spec.skip-macros=true \
-J-Dclojure.compiler.direct-linking=true \

View file

@ -19,6 +19,7 @@
, javacSupport ? false, javacPackages ? [ openjdk11 ]
, odbcSupport ? false, odbcPackages ? [ unixODBC ]
, withSystemd ? stdenv.isLinux # systemd support in epmd
, opensslPackage ? openssl
, wxPackages ? [ libGL libGLU wxGTK xorg.libX11 ]
, preUnpack ? "", postUnpack ? ""
, patches ? [], patchPhase ? "", prePatch ? "", postPatch ? ""
@ -51,7 +52,7 @@ in stdenv.mkDerivation ({
nativeBuildInputs = [ autoconf makeWrapper perl gnum4 libxslt libxml2 ];
buildInputs = [ ncurses openssl ]
buildInputs = [ ncurses opensslPackage ]
++ optionals wxSupport wxPackages2
++ optionals odbcSupport odbcPackages
++ optionals javacSupport javacPackages
@ -80,7 +81,7 @@ in stdenv.mkDerivation ({
./otp_build autoconf
'';
configureFlags = [ "--with-ssl=${openssl.dev}" ]
configureFlags = [ "--with-ssl=${lib.getDev opensslPackage}" ]
++ optional enableThreads "--enable-threads"
++ optional enableSmpSupport "--enable-smp-support"
++ optional enableKernelPoll "--enable-kernel-poll"

View file

@ -30,6 +30,10 @@ stdenv.mkDerivation rec {
# Causes build failure due to warning
hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
# Causes build failure due to warning
# https://github.com/jsoftware/jsource/issues/16
NIX_CFLAGS_COMPILE = "-Wno-error=return-local-addr";
buildPhase = ''
export SOURCE_DIR=$(pwd)
export HOME=$TMPDIR

View file

@ -1,6 +1,6 @@
{ stdenv, buildPackages, lib
, fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub
, zlib, openssl, gdbm, ncurses, readline, groff, libyaml, libffi, autoreconfHook, bison
, zlib, openssl, gdbm, ncurses, readline, groff, libyaml, libffi, jemalloc, autoreconfHook, bison
, autoconf, libiconv, libobjc, libunwind, Foundation
, buildEnv, bundler, bundix
, makeWrapper, buildRubyGem, defaultGemConfig, removeReferencesTo
@ -44,6 +44,7 @@ let
, groff, docSupport ? true
, libyaml, yamlSupport ? true
, libffi, fiddleSupport ? true
, jemalloc, jemallocSupport ? false
# By default, ruby has 3 observed references to stdenv.cc:
#
# - If you run:
@ -94,6 +95,7 @@ let
++ (op opensslSupport openssl)
++ (op gdbmSupport gdbm)
++ (op yamlSupport libyaml)
++ (op jemallocSupport jemalloc)
# Looks like ruby fails to build on darwin without readline even if curses
# support is not enabled, so add readline to the build inputs if curses
# support is disabled (if it's enabled, we already have it) and we're
@ -134,6 +136,7 @@ let
++ op useRailsExpress "--with-baseruby=${baseruby}/bin/ruby"
++ op (!jitSupport) "--disable-jit-support"
++ op (!docSupport) "--disable-install-doc"
++ op (jemallocSupport) "--with-jemalloc"
++ ops stdenv.isDarwin [
# on darwin, we have /usr/include/tk.h -- so the configure script detects
# that tk is installed

View file

@ -15,6 +15,9 @@ stdenv.mkDerivation {
makeFlags = [ "GOCACHE=$(TMPDIR)/go-cache" ];
# CMAKE_OSX_ARCHITECTURES is set to x86_64 by Nix, but it confuses boringssl on aarch64-linux.
cmakeFlags = lib.optionals (stdenv.isLinux) [ "-DCMAKE_OSX_ARCHITECTURES=" ];
installPhase = ''
mkdir -p $bin/bin $out/include $out/lib

View file

@ -0,0 +1,40 @@
{ lib, stdenv, fetchFromGitLab, fetchurl, autoconf-archive, autoreconfHook, pkg-config, python3 }:
let
chromium_version = "90.0.4417.1";
hsts_list = fetchurl {
url = "https://raw.github.com/chromium/chromium/${chromium_version}/net/http/transport_security_state_static.json";
sha256 = "09f24n30x5dmqk8zk7k2glcilgr27832a3304wj1yp97158sqsfx";
};
in
stdenv.mkDerivation rec {
pname = "libhsts";
version = "0.1.0";
src = fetchFromGitLab {
owner = "rockdaboot";
repo = pname;
rev = "libhsts-${version}";
sha256 = "0gbchzf0f4xzb6zjc56dk74hqrmdgyirmgxvvsqp9vqn9wb5kkx4";
};
postPatch = ''
pushd tests
cp ${hsts_list} transport_security_state_static.json
sed 's/^ *\/\/.*$//g' transport_security_state_static.json >hsts.json
popd
patchShebangs src/hsts-make-dafsa
'';
nativeBuildInputs = [ autoconf-archive autoreconfHook pkg-config python3 ];
outputs = [ "out" "dev" ];
meta = with lib; {
description = "Library to easily check a domain against the Chromium HSTS Preload list";
homepage = "https://gitlab.com/rockdaboot/libhsts";
license = with licenses; [ mit bsd3 ];
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -0,0 +1,13 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq
set -euo pipefail -x
cd "$(dirname "$0")"
chromium_version=$(curl -s "https://api.github.com/repos/chromium/chromium/tags" | jq -r 'map(select(.prerelease | not)) | .[1].name')
sha256=$(nix-prefetch-url "https://raw.github.com/chromium/chromium/$chromium_version/net/http/transport_security_state_static.json")
sed -e "0,/chromium_version/s/chromium_version = \".*\"/chromium_version = \"$chromium_version\"/" \
-e "0,/sha256/s/sha256 = \".*\"/sha256 = \"$sha256\"/" \
--in-place ./default.nix

View file

@ -13,6 +13,12 @@ in stdenv.mkDerivation rec {
sha256 = "0p0hpjajfkskhd7jiv5zwhfa8hi49q3mgifjlkqvy99xspv98ijj";
};
postPatch = ''
substituteInPlace blas/Makefile \
--replace "ar rcv" "${stdenv.cc.targetPrefix}ar rcv" \
--replace "ranlib" "${stdenv.cc.targetPrefix}ranlib"
'';
outputs = [ "bin" "dev" "out" ];
nativeBuildInputs = lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];

View file

@ -38,5 +38,7 @@ stdenv.mkDerivation rec {
homepage = "https://beltoforion.de/en/muparserx/";
license = licenses.bsd2;
maintainers = with maintainers; [ drewrisinger ];
# selftest fails
broken = stdenv.isDarwin;
};
}

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "nuraft";
version = "1.1.2";
version = "1.2.0";
src = fetchFromGitHub {
owner = "eBay";
repo = "NuRaft";
rev = "v${version}";
sha256 = "sha256-l6rG8f+JAWfAJxEZPKRHZo2k8x9WbtSJC3gGCSMHYfs=";
sha256 = "sha256-1k+AWmpAiHcQVEB5kUaMtNWhOnTBnmJiNU8zL1J/PEk=";
};
nativeBuildInputs = [ cmake ];

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "osm-gps-map";
version = "1.1.0";
version = "1.2.0";
src = fetchzip {
url = "https://github.com/nzjrs/osm-gps-map/releases/download/${version}/osm-gps-map-${version}.tar.gz";
sha256 = "0fal3mqcf3yypir4f7njz0dm5wr7lqwpimjx28wz9imh48cqx9n9";
sha256 = "sha256-ciw28YXhR+GC6B2VPC+ZxjyhadOk3zYGuOssSgqjwH0=";
};
outputs = [ "out" "dev" "doc" ];

View file

@ -19,13 +19,16 @@
, libsndfile
, vulkan-headers
, vulkan-loader
, ncurses
, makeFontsConf
, callPackage
, nixosTests
, withMediaSession ? true
, gstreamerSupport ? true, gst_all_1 ? null
, ffmpegSupport ? true, ffmpeg ? null
, bluezSupport ? true, bluez ? null, sbc ? null, libopenaptx ? null, ldacbt ? null
, bluezSupport ? true, bluez ? null, sbc ? null, libopenaptx ? null, ldacbt ? null, fdk_aac ? null
, nativeHspSupport ? true
, nativeHfpSupport ? true
, ofonoSupport ? true
, hsphfpdSupport ? true
}:
@ -36,111 +39,117 @@ let
};
mesonBool = b: if b then "true" else "false";
in
stdenv.mkDerivation rec {
pname = "pipewire";
version = "0.3.18";
outputs = [
"out"
"lib"
"pulse"
"jack"
"dev"
"doc"
"installedTests"
];
self = stdenv.mkDerivation rec {
pname = "pipewire";
version = "0.3.21";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pipewire";
repo = "pipewire";
rev = version;
sha256 = "1yghhgs18yqrnd0b2r75l5n8yng962r1wszbsi01v6i9zib3jc9g";
};
outputs = [
"out"
"lib"
"pulse"
"jack"
"dev"
"doc"
"mediaSession"
"installedTests"
];
patches = [
# Break up a dependency cycle between outputs.
./alsa-profiles-use-libdir.patch
# Move installed tests into their own output.
./installed-tests-path.patch
# Change the path of the pipewire-pulse binary in the service definition.
./pipewire-pulse-path.patch
# Add flag to specify configuration directory (different from the installation directory).
./pipewire-config-dir.patch
];
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pipewire";
repo = "pipewire";
rev = version;
hash = "sha256:2YJzPTMPIoQQeNja3F53SD4gtpdSlbD/i77hBWiQfuQ=";
};
nativeBuildInputs = [
doxygen
graphviz
meson
ninja
pkg-config
];
patches = [
# Break up a dependency cycle between outputs.
./alsa-profiles-use-libdir.patch
# Move installed tests into their own output.
./installed-tests-path.patch
# Change the path of the pipewire-pulse binary in the service definition.
./pipewire-pulse-path.patch
# Add flag to specify configuration directory (different from the installation directory).
./pipewire-config-dir.patch
];
buildInputs = [
alsaLib
dbus
glib
libjack2
libsndfile
udev
vulkan-headers
vulkan-loader
valgrind
systemd
] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
++ lib.optional ffmpegSupport ffmpeg
++ lib.optionals bluezSupport [ bluez libopenaptx ldacbt sbc ];
nativeBuildInputs = [
doxygen
graphviz
meson
ninja
pkg-config
];
mesonFlags = [
"-Ddocs=true"
"-Dman=false" # we don't have xmltoman
"-Dexamples=true" # only needed for `pipewire-media-session`
"-Dudevrulesdir=lib/udev/rules.d"
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
"-Dlibjack-path=${placeholder "jack"}/lib"
"-Dgstreamer=${mesonBool gstreamerSupport}"
"-Dffmpeg=${mesonBool ffmpegSupport}"
"-Dbluez5=${mesonBool bluezSupport}"
"-Dbluez5-backend-native=${mesonBool nativeHspSupport}"
"-Dbluez5-backend-ofono=${mesonBool ofonoSupport}"
"-Dbluez5-backend-hsphfpd=${mesonBool hsphfpdSupport}"
"-Dpipewire_config_dir=/etc/pipewire"
];
buildInputs = [
alsaLib
dbus
glib
libjack2
libsndfile
ncurses
udev
vulkan-headers
vulkan-loader
valgrind
systemd
] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
++ lib.optional ffmpegSupport ffmpeg
++ lib.optionals bluezSupport [ bluez libopenaptx ldacbt sbc fdk_aac ];
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
mesonFlags = [
"-Ddocs=true"
"-Dman=false" # we don't have xmltoman
"-Dexamples=${mesonBool withMediaSession}" # only needed for `pipewire-media-session`
"-Dudevrulesdir=lib/udev/rules.d"
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
"-Dlibjack-path=${placeholder "jack"}/lib"
"-Dgstreamer=${mesonBool gstreamerSupport}"
"-Dffmpeg=${mesonBool ffmpegSupport}"
"-Dbluez5=${mesonBool bluezSupport}"
"-Dbluez5-backend-hsp-native=${mesonBool nativeHspSupport}"
"-Dbluez5-backend-hfp-native=${mesonBool nativeHfpSupport}"
"-Dbluez5-backend-ofono=${mesonBool ofonoSupport}"
"-Dbluez5-backend-hsphfpd=${mesonBool hsphfpdSupport}"
"-Dpipewire_config_dir=/etc/pipewire"
];
doCheck = true;
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
postInstall = ''
moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse"
moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse"
moveToOutput "bin/pipewire-pulse" "$pulse"
'';
doCheck = true;
passthru.tests = {
installedTests = nixosTests.installed-tests.pipewire;
postInstall = ''
moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse"
moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse"
moveToOutput "bin/pipewire-pulse" "$pulse"
moveToOutput "bin/pipewire-media-session" "$mediaSession"
'';
# This ensures that all the paths used by the NixOS module are found.
test-paths = callPackage ./test-paths.nix {
paths-out = [
"share/alsa/alsa.conf.d/50-pipewire.conf"
];
paths-lib = [
"lib/alsa-lib/libasound_module_pcm_pipewire.so"
"share/alsa-card-profile/mixer"
];
passthru.tests = {
installedTests = nixosTests.installed-tests.pipewire;
# This ensures that all the paths used by the NixOS module are found.
test-paths = callPackage ./test-paths.nix {
paths-out = [
"share/alsa/alsa.conf.d/50-pipewire.conf"
];
paths-lib = [
"lib/alsa-lib/libasound_module_pcm_pipewire.so"
"share/alsa-card-profile/mixer"
];
};
};
meta = with lib; {
description = "Server and user space API to deal with multimedia pipelines";
homepage = "https://pipewire.org/";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ jtojnar ];
};
};
meta = with lib; {
description = "Server and user space API to deal with multimedia pipelines";
homepage = "https://pipewire.org/";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ jtojnar ];
};
}
in self

View file

@ -1,19 +1,22 @@
diff --git a/meson_options.txt b/meson_options.txt
index 4b9e46b8..9d73ed06 100644
index 050a4c31..c481e76c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -147,3 +147,6 @@ option('pw-cat',
@@ -148,6 +148,9 @@ option('udev',
option('udevrulesdir',
type : 'string',
description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
+option('pipewire_pulse_prefix',
+ type : 'string',
+ description : 'Install directory for the pipewire-pulse daemon')
option('systemd-user-unit-dir',
type : 'string',
description : 'Directory for user systemd units (defaults to /usr/lib/systemd/user)')
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
index 29fc93d4..f78946f2 100644
index 46dfbbc8..0d975cec 100644
--- a/src/daemon/systemd/user/meson.build
+++ b/src/daemon/systemd/user/meson.build
@@ -6,7 +6,7 @@ install_data(
@@ -9,7 +9,7 @@ install_data(
systemd_config = configuration_data()
systemd_config.set('PW_BINARY', join_paths(pipewire_bindir, 'pipewire'))

View file

@ -1,38 +0,0 @@
source $stdenv/setup
preConfigure() {
# Patch some of the configure files a bit to get of global paths.
# (Buildings using stuff in those paths will fail anyway, but it
# will cause ./configure misdetections).
for i in config.tests/unix/checkavail config.tests/*/*.test mkspecs/*/qmake.conf; do
echo "patching $i..."
substituteInPlace "$i" \
--replace " /lib" " /FOO" \
--replace "/usr" "/FOO"
done
}
# !!! TODO: -system-libmng
configureFlags="-prefix $out $configureFlags"
dontAddPrefix=1
configureScript=configureScript
configureScript() {
echo yes | ./configure $configureFlags
export LD_LIBRARY_PATH=$(pwd)/lib
}
postInstall() {
# Qt's `make install' is broken; it copies ./bin/qmake, which
# is a symlink to ./qmake/qmake. So we end up with a dangling
# symlink.
rm $out/bin/qmake
cp -p qmake/qmake $out/bin
}
genericBuild

View file

@ -1,92 +0,0 @@
{ lib, stdenv, fetchurl
, xftSupport ? true, libXft ? null
, xrenderSupport ? true, libXrender ? null
, xrandrSupport ? true, libXrandr ? null
, xineramaSupport ? true, libXinerama ? null
, cursorSupport ? true, libXcursor ? null
, threadSupport ? true
, mysqlSupport ? false, libmysqlclient ? null
, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, openglSupport ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
, libGL ? null, libGLU ? null, libXmu ? null
, xlibsWrapper, xorgproto, zlib, libjpeg, libpng, which
}:
assert xftSupport -> libXft != null;
assert xrenderSupport -> xftSupport && libXrender != null;
assert xrandrSupport -> libXrandr != null;
assert cursorSupport -> libXcursor != null;
assert mysqlSupport -> libmysqlclient != null;
assert openglSupport -> libGL != null && libGLU != null && libXmu != null;
stdenv.mkDerivation {
name = "qt-3.3.8";
builder = ./builder.sh;
setupHook = ./setup-hook.sh;
src = fetchurl {
url = "http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8.tar.bz2";
sha256 = "0jd4g3bwkgk2s4flbmgisyihm7cam964gzb3pawjlkhas01zghz8";
};
nativeBuildInputs = [ which ];
propagatedBuildInputs = [libpng xlibsWrapper libXft libXrender zlib libjpeg];
hardeningDisable = [ "format" ];
configureFlags = let
mk = cond: name: "-${lib.optionalString (!cond) "no-"}${name}";
in [
"-v"
"-system-zlib" "-system-libpng" "-system-libjpeg"
"-qt-gif"
"-I${xorgproto}/include"
(mk threadSupport "thread")
(mk xrenderSupport "xrender")
(mk xrandrSupport "xrandr")
(mk xineramaSupport "xinerama")
(mk xrandrSupport "xrandr")
(mk xftSupport "xft")
] ++ lib.optionals openglSupport [
"-dlopen-opengl"
"-L${libGL}/lib" "-I${libGLU}/include"
"-L${libXmu.out}/lib" "-I${libXmu.dev}/include"
] ++ lib.optionals xrenderSupport [
"-L${libXrender.out}/lib" "-I${libXrender.dev}/include"
] ++ lib.optionals xrandrSupport [
"-L${libXrandr.out}/lib" "-I${libXrandr.dev}/include"
] ++ lib.optionals xineramaSupport [
"-L${libXinerama.out}/lib" "-I${libXinerama.dev}/include"
] ++ lib.optionals cursorSupport [
"-L${libXcursor.out}/lib -I${libXcursor.dev}/include"
] ++ lib.optionals mysqlSupport [
"-qt-sql-mysql" "-L${libmysqlclient}/lib/mysql" "-I${libmysqlclient}/include/mysql"
] ++ lib.optionals xftSupport [
"-L${libXft.out}/lib" "-I${libXft.dev}/include"
"-L${libXft.freetype.out}/lib" "-I${libXft.freetype.dev}/include"
"-L${libXft.fontconfig.lib}/lib" "-I${libXft.fontconfig.dev}/include"
];
patches = [
# Don't strip everything so we can get useful backtraces.
./strip.patch
# Build on NixOS.
./qt-pwd.patch
# randr.h and Xrandr.h need not be in the same prefix.
./xrandr.patch
# Make it build with gcc 4.6.0
./qt3-gcc4.6.0.patch
];
passthru = {inherit mysqlSupport;};
meta = with lib; {
license = with licenses; [ gpl2 qpl ];
platforms = platforms.linux;
};
}

View file

@ -1,15 +0,0 @@
diff -ruN qt-x11-free-3.3.3/configure qt-x11-free-3.3.3.new/configure
--- qt-x11-free-3.3.3/configure 2004-06-14 11:18:55.000000000 +0200
+++ qt-x11-free-3.3.3.new/configure 2005-11-12 19:39:43.000000000 +0100
@@ -16,9 +16,9 @@
relconf=`basename $0`
# the directory of this script is the "source tree"
relpath=`dirname $0`
-relpath=`(cd $relpath; /bin/pwd)`
+relpath=`(cd $relpath; pwd)`
# the current directory is the "build tree" or "object tree"
-outpath=`/bin/pwd`
+outpath=`pwd`
# later cache the command line in config.status
OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`

View file

@ -1,23 +0,0 @@
I picked it here:
https://bugs.archlinux.org/task/23915
--- qt-x11-free-3.3.8b/src/tools/qmap.h~ 2008-01-15 19:09:13.000000000 +0000
+++ qt-x11-free-3.3.8b/src/tools/qmap.h 2011-04-11 00:16:04.000000000 +0100
@@ -50,6 +50,7 @@
#endif // QT_H
#ifndef QT_NO_STL
+#include <cstddef>
#include <iterator>
#include <map>
#endif
--- qt-x11-free-3.3.8b/src/tools/qvaluelist.h~ 2008-01-15 19:09:13.000000000 +0000
+++ qt-x11-free-3.3.8b/src/tools/qvaluelist.h 2011-04-11 00:16:49.000000000 +0100
@@ -48,6 +48,7 @@
#endif // QT_H
#ifndef QT_NO_STL
+#include <cstddef>
#include <iterator>
#include <list>
#endif

View file

@ -1 +0,0 @@
export QTDIR=@out@

View file

@ -1,18 +0,0 @@
diff -rc qt-x11-free-3.3.3-orig/mkspecs/linux-g++/qmake.conf qt-x11-free-3.3.3/mkspecs/linux-g++/qmake.conf
*** qt-x11-free-3.3.3-orig/mkspecs/linux-g++/qmake.conf 2004-08-05 16:42:57.000000000 +0200
--- qt-x11-free-3.3.3/mkspecs/linux-g++/qmake.conf 2005-03-02 12:25:55.000000000 +0100
***************
*** 85,90 ****
QMAKE_DEL_FILE = rm -f
QMAKE_DEL_DIR = rmdir
QMAKE_STRIP = strip
! QMAKE_STRIPFLAGS_LIB += --strip-unneeded
QMAKE_CHK_DIR_EXISTS = test -d
QMAKE_MKDIR = mkdir -p
--- 85,90 ----
QMAKE_DEL_FILE = rm -f
QMAKE_DEL_DIR = rmdir
QMAKE_STRIP = strip
! QMAKE_STRIPFLAGS_LIB += --strip-debug
QMAKE_CHK_DIR_EXISTS = test -d
QMAKE_MKDIR = mkdir -p

View file

@ -1,42 +0,0 @@
diff -rc qt-x11-free-3.3.6-orig/config.tests/x11/xrandr.test qt-x11-free-3.3.6/config.tests/x11/xrandr.test
*** qt-x11-free-3.3.6-orig/config.tests/x11/xrandr.test 2006-09-14 14:00:08.000000000 +0200
--- qt-x11-free-3.3.6/config.tests/x11/xrandr.test 2006-09-14 14:10:39.000000000 +0200
***************
*** 52,69 ****
INCDIRS="$IN_INCDIRS $XDIRS /FOO/include /include"
F=
for INCDIR in $INCDIRS; do
! if [ -f $INCDIR/$INC -a -f $INCDIR/$INC2 ]; then
F=yes
! XRANDR_H=$INCDIR/$INC
RANDR_H=$INCDIR/$INC2
! [ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR"
break
fi
done
if [ -z "$F" ]
then
XRANDR=no
! [ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS"
fi
fi
--- 52,69 ----
INCDIRS="$IN_INCDIRS $XDIRS /FOO/include /include"
F=
for INCDIR in $INCDIRS; do
! if [ -f $INCDIR/$INC2 ]; then
F=yes
! # XRANDR_H=$INCDIR/$INC
RANDR_H=$INCDIR/$INC2
! [ "$VERBOSE" = "yes" ] && echo " Found $INC2 in $INCDIR"
break
fi
done
if [ -z "$F" ]
then
XRANDR=no
! [ "$VERBOSE" = "yes" ] && echo " Could not find $INC2 anywhere in $INCDIRS"
fi
fi

Some files were not shown because too many files have changed in this diff Show more