Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
John Ericson 2020-11-28 21:33:03 -05:00
commit 73425f6c3b
246 changed files with 5669 additions and 3717 deletions

View file

@ -0,0 +1,140 @@
# Go {#sec-language-go}
## Go modules {#ssec-language-go}
The function `buildGoModule` builds Go programs managed with Go modules. It builds a [Go Modules](https://github.com/golang/go/wiki/Modules) through a two phase build:
- An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
- A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
### Example for `buildGoModule` {#ex-buildGoModule}
In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function:
- `vendorSha256`: is the hash of the output of the intermediate fetcher derivation. `vendorSha256` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorSha256 = null;`
- `runVend`: runs the vend command to generate the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build.
```nix
pet = buildGoModule rec {
pname = "pet";
version = "0.3.4";
src = fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
};
vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j";
runVend = true;
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}
```
## `buildGoPackage` (legacy) {#ssec-go-legacy}
The function `buildGoPackage` builds legacy Go programs, not supporting Go modules.
### Example for `buildGoPackage`
In the following is an example expression using buildGoPackage, the following arguments are of special significance to the function:
- `goPackagePath` specifies the package's canonical Go import path.
- `goDeps` is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate `deps.nix` file for readability. The dependency data structure is described below.
```nix
deis = buildGoPackage rec {
pname = "deis";
version = "1.13.0";
goPackagePath = "github.com/deis/deis";
src = fetchFromGitHub {
owner = "deis";
repo = "deis";
rev = "v${version}";
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
};
goDeps = ./deps.nix;
}
```
The `goDeps` attribute can be imported from a separate `nix` file that defines which Go libraries are needed and should be included in `GOPATH` for `buildPhase`:
```nix
# deps.nix
[ # goDeps is a list of Go dependencies.
{
# goPackagePath specifies Go package import path.
goPackagePath = "gopkg.in/yaml.v2";
fetch = {
# `fetch type` that needs to be used to get package source.
# If `git` is used there should be `url`, `rev` and `sha256` defined next to it.
type = "git";
url = "https://gopkg.in/yaml.v2";
rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
};
}
{
goPackagePath = "github.com/docopt/docopt-go";
fetch = {
type = "git";
url = "https://github.com/docopt/docopt-go";
rev = "784ddc588536785e7299f7272f39101f7faccc3f";
sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj";
};
}
]
```
To extract dependency information from a Go package in automated way use [go2nix](https://github.com/kamilchm/go2nix). It can produce complete derivation and `goDeps` file for Go programs.
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
```bash
for p in $NIX_PROFILES; do
GOPATH="$p/share/go:$GOPATH"
done
```
## Attributes used by the builders {#ssec-go-common-attributes}
Both `buildGoModule` and `buildGoPackage` can be tweaked to behave slightly differently, if the following attributes are used:
### `buildFlagsArray` and `buildFlags`: {#ex-goBuildFlags-noarray}
These attributes set build flags supported by `go build`. We recommend using `buildFlagsArray`. The most common use case of these attributes is to make the resulting executable aware of its own version. For example:
```nix
buildFlagsArray = [
# Note: single quotes are not needed.
"-ldflags=-X main.Version=${version} -X main.Commit=${version}"
];
```
```nix
buildFlagsArray = ''
-ldflags=
-X main.Version=${version}
-X main.Commit=${version}
'';
```
### `deleteVendor` {#var-go-deleteVendor}
Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
### `subPackages` {#var-go-subPackages}
Limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.

View file

@ -1,248 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-go">
<title>Go</title>
<section xml:id="ssec-go-modules">
<title>Go modules</title>
<para>
The function <varname> buildGoModule </varname> builds Go programs managed with Go modules. It builds a <link xlink:href="https://github.com/golang/go/wiki/Modules">Go modules</link> through a two phase build:
<itemizedlist>
<listitem>
<para>
An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
</para>
</listitem>
<listitem>
<para>
A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
</para>
</listitem>
</itemizedlist>
</para>
<example xml:id='ex-buildGoModule'>
<title>buildGoModule</title>
<programlisting>
pet = buildGoModule rec {
pname = "pet";
version = "0.3.4";
src = fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
};
vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
runVend = true; <co xml:id='ex-buildGoModule-2' />
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";
homepage = "https://github.com/knqyf263/pet";
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}
</programlisting>
</example>
<para>
<xref linkend='ex-buildGoModule'/> is an example expression using buildGoModule, the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs='ex-buildGoModule-1'>
<para>
<varname>vendorSha256</varname> is the hash of the output of the intermediate fetcher derivation.
</para>
</callout>
<callout arearefs='ex-buildGoModule-2'>
<para>
<varname>runVend</varname> runs the vend command to generate the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build.
</para>
</callout>
</calloutlist>
</para>
<para>
<varname>vendorSha256</varname> can also take <varname>null</varname> as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set 'vendorSha256 = null;'
</para>
</section>
<section xml:id="ssec-go-legacy">
<title>Go legacy</title>
<para>
The function <varname> buildGoPackage </varname> builds legacy Go programs, not supporting Go modules.
</para>
<example xml:id='ex-buildGoPackage'>
<title>buildGoPackage</title>
<programlisting>
deis = buildGoPackage rec {
pname = "deis";
version = "1.13.0";
goPackagePath = "github.com/deis/deis"; <co xml:id='ex-buildGoPackage-1' />
src = fetchFromGitHub {
owner = "deis";
repo = "deis";
rev = "v${version}";
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
};
goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-2' />
}
</programlisting>
</example>
<para>
<xref linkend='ex-buildGoPackage'/> is an example expression using buildGoPackage, the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs='ex-buildGoPackage-1'>
<para>
<varname>goPackagePath</varname> specifies the package's canonical Go import path.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-2'>
<para>
<varname>goDeps</varname> is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate <varname>deps.nix</varname> file for readability. The dependency data structure is described below.
</para>
</callout>
</calloutlist>
</para>
<para>
The <varname>goDeps</varname> attribute can be imported from a separate <varname>nix</varname> file that defines which Go libraries are needed and should be included in <varname>GOPATH</varname> for <varname>buildPhase</varname>.
</para>
<example xml:id='ex-goDeps'>
<title>deps.nix</title>
<programlisting>
[ <co xml:id='ex-goDeps-1' />
{
goPackagePath = "gopkg.in/yaml.v2"; <co xml:id='ex-goDeps-2' />
fetch = {
type = "git"; <co xml:id='ex-goDeps-3' />
url = "https://gopkg.in/yaml.v2";
rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
};
}
{
goPackagePath = "github.com/docopt/docopt-go";
fetch = {
type = "git";
url = "https://github.com/docopt/docopt-go";
rev = "784ddc588536785e7299f7272f39101f7faccc3f";
sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj";
};
}
]
</programlisting>
</example>
<para>
<calloutlist>
<callout arearefs='ex-goDeps-1'>
<para>
<varname>goDeps</varname> is a list of Go dependencies.
</para>
</callout>
<callout arearefs='ex-goDeps-2'>
<para>
<varname>goPackagePath</varname> specifies Go package import path.
</para>
</callout>
<callout arearefs='ex-goDeps-3'>
<para>
<varname>fetch type</varname> that needs to be used to get package source. If <varname>git</varname> is used there should be <varname>url</varname>, <varname>rev</varname> and <varname>sha256</varname> defined next to it.
</para>
</callout>
</calloutlist>
</para>
<para>
To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/kamilchm/go2nix">go2nix</link>. It can produce complete derivation and <varname>goDeps</varname> file for Go programs.
</para>
<para>
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
<screen>
for p in $NIX_PROFILES; do
GOPATH="$p/share/go:$GOPATH"
done
</screen>
</para>
</section>
<section xml:id="ssec-go-common-attributes">
<title>Attributes used by the builders</title>
<para>
Both <link xlink:href="#ssec-go-modules"><varname>buildGoModule</varname></link> and <link xlink:href="#ssec-go-modules"><varname>buildGoPackage</varname></link> can be tweaked to behave slightly differently, if the following attributes are used:
</para>
<variablelist>
<varlistentry xml:id="var-go-buildFlagsArray">
<term>
<varname>buildFlagsArray</varname> and <varname>buildFlags</varname>
</term>
<listitem>
<para>
These attributes set build flags supported by <varname>go build</varname>. We recommend using <varname>buildFlagsArray</varname>. The most common use case of these attributes is to make the resulting executable aware of its own version. For example:
</para>
<example xml:id='ex-goBuildFlags-nospaces'>
<title>buildFlagsArray</title>
<programlisting>
buildFlagsArray = [
"-ldflags=-X main.Version=${version} -X main.Commit=${version}" <co xml:id='ex-goBuildFlags-1' />
];
</programlisting>
</example>
<calloutlist>
<callout arearefs='ex-goBuildFlags-1'>
<para>
Note: single quotes are not needed.
</para>
</callout>
</calloutlist>
<example xml:id='ex-goBuildFlags-noarray'>
<title>buildFlagsArray</title>
<programlisting>
buildFlagsArray = ''
-ldflags=
-X main.Version=${version}
-X main.Commit=${version}
'';
</programlisting>
</example>
</listitem>
</varlistentry>
<varlistentry xml:id="var-go-deleteVendor">
<term>
<varname>deleteVendor</varname>
</term>
<listitem>
<para>
Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="var-go-subPackages">
<term>
<varname>subPackages</varname>
</term>
<listitem>
<para>
Limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>

View file

@ -13,7 +13,7 @@
<xi:include href="crystal.section.xml" />
<xi:include href="emscripten.section.xml" />
<xi:include href="gnome.xml" />
<xi:include href="go.xml" />
<xi:include href="go.section.xml" />
<xi:include href="haskell.section.xml" />
<xi:include href="idris.section.xml" />
<xi:include href="ios.section.xml" />
@ -27,7 +27,7 @@
<xi:include href="python.section.xml" />
<xi:include href="qt.xml" />
<xi:include href="r.section.xml" />
<xi:include href="ruby.xml" />
<xi:include href="ruby.section.xml" />
<xi:include href="rust.section.xml" />
<xi:include href="texlive.xml" />
<xi:include href="titanium.section.xml" />

View file

@ -153,7 +153,7 @@ The dot product of [1 2] and [3 4] is: 11
But if we maintain the script ourselves, and if there are more dependencies, it
may be nice to encode those dependencies in source to make the script re-usable
without that bit of knowledge. That can be done by using `nix-shell` as a
[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix), like so:
[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)), like so:
```python
#!/usr/bin/env nix-shell

View file

@ -1,74 +1,38 @@
---
title: Ruby
author: Michael Fellinger
date: 2019-05-23
---
# Ruby {#sec-language-ruby}
# Ruby
## Using Ruby
## User Guide
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 2.6. It's also possible to refer to specific versions, e.g. `ruby_2_y`, `jruby`, or `mruby`.
### Using Ruby
In the Nixpkgs tree, Ruby packages can be found throughout, depending on what they do, and are called from the main package set. Ruby gems, however are separate sets, and there's one default set for each interpreter (currently MRI only).
#### Overview
There are two main approaches for using Ruby with gems. One is to use a specifically locked `Gemfile` for an application that has very strict dependencies. The other is to depend on the common gems, which we'll explain further down, and rely on them being updated regularly.
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby.
The attribute `ruby` refers to the default Ruby interpreter, which is currently
MRI 2.5. It's also possible to refer to specific versions, e.g. `ruby_2_6`, `jruby`, or `mruby`.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_2_6.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
In the nixpkgs tree, Ruby packages can be found throughout, depending on what
they do, and are called from the main package set. Ruby gems, however are
separate sets, and there's one default set for each interpreter (currently MRI
only).
Since not all gems have executables like `nokogiri`, it's usually more convenient to use the `withPackages` function like this: `ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the Ruby in your environment will be able to find the gem and it can be used in your Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"` as usual.
There are two main approaches for using Ruby with gems.
One is to use a specifically locked `Gemfile` for an application that has very strict dependencies.
The other is to depend on the common gems, which we'll explain further down, and
rely on them being updated regularly.
### Temporary Ruby environment with `nix-shell`
The interpreters have common attributes, namely `gems`, and `withPackages`. So
you can refer to `ruby.gems.nokogiri`, or `ruby_2_5.gems.nokogiri` to get the
Nokogiri gem already compiled and ready to use.
Rather than having a single Ruby environment shared by all Ruby development projects on a system, Nix allows you to create separate environments per project. `nix-shell` gives you the possibility to temporarily load another environment akin to a combined `chruby` or `rvm` and `bundle exec`.
Since not all gems have executables like `nokogiri`, it's usually more
convenient to use the `withPackages` function like this:
`ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the
Ruby in your environment will be able to find the gem and it can be used in your
Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"`
as usual.
There are two methods for loading a shell with Ruby packages. The first and recommended method is to create an environment with `ruby.withPackages` and load that.
#### Temporary Ruby environment with `nix-shell`
Rather than having a single Ruby environment shared by all Ruby
development projects on a system, Nix allows you to create separate
environments per project. `nix-shell` gives you the possibility to
temporarily load another environment akin to a combined `chruby` or
`rvm` and `bundle exec`.
There are two methods for loading a shell with Ruby packages. The first and
recommended method is to create an environment with `ruby.withPackages` and load
that.
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
```
The other method, which is not recommended, is to create an environment and list
all the packages directly.
The other method, which is not recommended, is to create an environment and list all the packages directly.
```shell
nix-shell -p ruby.gems.nokogiri ruby.gems.pry
```ShellSession
$ nix-shell -p ruby.gems.nokogiri ruby.gems.pry
```
Again, it's possible to launch the interpreter from the shell. The Ruby
interpreter has the attribute `gems` which contains all Ruby gems for that
specific interpreter.
Again, it's possible to launch the interpreter from the shell. The Ruby interpreter has the attribute `gems` which contains all Ruby gems for that specific interpreter.
##### Load environment from `.nix` expression
#### Load Ruby environment from `.nix` expression
As explained in the Nix manual, `nix-shell` can also load an expression from a
`.nix` file. Say we want to have Ruby 2.5, `nokogori`, and `pry`. Consider a
`shell.nix` file with:
As explained in the Nix manual, `nix-shell` can also load an expression from a `.nix` file. Say we want to have Ruby 2.6, `nokogori`, and `pry`. Consider a `shell.nix` file with:
```nix
with import <nixpkgs> {};
@ -77,43 +41,33 @@ ruby.withPackages (ps: with ps; [ nokogiri pry ])
What's happening here?
1. We begin with importing the Nix Packages collections. `import <nixpkgs>`
imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
brings all attributes of `nixpkgs` in the local scope. These attributes form
the main package set.
1. We begin with importing the Nix Packages collections. `import <nixpkgs>` imports the `<nixpkgs>` function, `{}` calls it and the `with` statement brings all attributes of `nixpkgs` in the local scope. These attributes form the main package set.
2. Then we create a Ruby environment with the `withPackages` function.
3. The `withPackages` function expects us to provide a function as an argument
that takes the set of all ruby gems and returns a list of packages to include
in the environment. Here, we select the packages `nokogiri` and `pry` from
the package set.
3. The `withPackages` function expects us to provide a function as an argument that takes the set of all ruby gems and returns a list of packages to include in the environment. Here, we select the packages `nokogiri` and `pry` from the package set.
##### Execute command with `--run`
#### Execute command with `--run`
A convenient flag for `nix-shell` is `--run`. It executes a command in the
`nix-shell`. We can e.g. directly open a `pry` REPL:
A convenient flag for `nix-shell` is `--run`. It executes a command in the `nix-shell`. We can e.g. directly open a `pry` REPL:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
```
Or immediately require `nokogiri` in pry:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
```
Or run a script using this environment:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
```ShellSession
$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
```
##### Using `nix-shell` as shebang
#### Using `nix-shell` as shebang
In fact, for the last case, there is a more convenient method. You can add a
[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script
specifying which dependencies `nix-shell` needs. With the following shebang, you
can just execute `./example.rb`, and it will run with all dependencies.
In fact, for the last case, there is a more convenient method. You can add a [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>) to your script specifying which dependencies `nix-shell` needs. With the following shebang, you can just execute `./example.rb`, and it will run with all dependencies.
```ruby
#! /usr/bin/env nix-shell
@ -126,35 +80,24 @@ body = RestClient.get('http://example.com').body
puts Nokogiri::HTML(body).at('h1').text
```
### Developing with Ruby
## Developing with Ruby
#### Using an existing Gemfile
### Using an existing Gemfile
In most cases, you'll already have a `Gemfile.lock` listing all your dependencies.
This can be used to generate a `gemset.nix` which is used to fetch the gems and
combine them into a single environment.
The reason why you need to have a separate file for this, is that Nix requires
you to have a checksum for each input to your build.
Since the `Gemfile.lock` that `bundler` generates doesn't provide us with
checksums, we have to first download each gem, calculate its SHA256, and store
it in this separate file.
In most cases, you'll already have a `Gemfile.lock` listing all your dependencies. This can be used to generate a `gemset.nix` which is used to fetch the gems and combine them into a single environment. The reason why you need to have a separate file for this, is that Nix requires you to have a checksum for each input to your build. Since the `Gemfile.lock` that `bundler` generates doesn't provide us with checksums, we have to first download each gem, calculate its SHA256, and store it in this separate file.
So the steps from having just a `Gemfile` to a `gemset.nix` are:
```shell
bundle lock
bundix
```ShellSession
$ bundle lock
$ bundix
```
If you already have a `Gemfile.lock`, you can simply run `bundix` and it will
work the same.
If you already have a `Gemfile.lock`, you can simply run `bundix` and it will work the same.
To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag,
which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent
time of modification.
To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag, which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent time of modification.
Once the `gemset.nix` is generated, it can be used in a
`bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
Once the `gemset.nix` is generated, it can be used in a `bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
```nix
# ...
@ -166,41 +109,26 @@ let
in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
```
With this file in your directory, you can run `nix-shell` to build and use the gems.
The important parts here are `bundlerEnv` and `wrappedRuby`.
With this file in your directory, you can run `nix-shell` to build and use the gems. The important parts here are `bundlerEnv` and `wrappedRuby`.
The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that
all the `/lib` and `/bin` directories will be available, and the executables of
all gems (even of indirect dependencies) will end up in your `$PATH`.
The `wrappedRuby` provides you with all executables that come with Ruby itself,
but wrapped so they can easily find the gems in your gemset.
The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that all the `/lib` and `/bin` directories will be available, and the executables of all gems (even of indirect dependencies) will end up in your `$PATH`. The `wrappedRuby` provides you with all executables that come with Ruby itself, but wrapped so they can easily find the gems in your gemset.
One common issue that you might have is that you have Ruby 2.6, but also
`bundler` in your gemset. That leads to a conflict for `/bin/bundle` and
`/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems
in a `lowPrio` call. So in order to give the `bundler` from your gemset
priority, it would be used like this:
One common issue that you might have is that you have Ruby 2.6, but also `bundler` in your gemset. That leads to a conflict for `/bin/bundle` and `/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems in a `lowPrio` call. So in order to give the `bundler` from your gemset priority, it would be used like this:
```nix
# ...
mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; }
```
### Gem-specific configurations and workarounds
#### Gem-specific configurations and workarounds
In some cases, especially if the gem has native extensions, you might need to modify the way the gem is built.
In some cases, especially if the gem has native extensions, you might need to
modify the way the gem is built.
This is done via a common configuration file that includes all of the workarounds for each gem.
This is done via a common configuration file that includes all of the
workarounds for each gem.
This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`, since it already contains a lot of entries, it should be pretty easy to add the modifications you need for your needs.
This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`,
since it already contains a lot of entries, it should be pretty easy to add the
modifications you need for your needs.
In the meanwhile, or if the modification is for a private gem, you can also add
the configuration to only your own environment.
In the meanwhile, or if the modification is for a private gem, you can also add the configuration to only your own environment.
Two places that allow this modification are the `ruby` derivation, or `bundlerEnv`.
@ -261,10 +189,9 @@ let
in pkgs.ruby.withPackages (ps: with ps; [ pg ])
```
Then we can get whichever postgresql version we desire and the `pg` gem will
always reference it correctly:
Then we can get whichever postgresql version we desire and the `pg` gem will always reference it correctly:
```shell
```ShellSession
$ nix-shell --argstr pg_version 9_4 --run 'ruby -rpg -e "puts PG.library_version"'
90421
@ -272,24 +199,15 @@ $ nix-shell --run 'ruby -rpg -e "puts PG.library_version"'
100007
```
Of course for this use-case one could also use overlays since the configuration
for `pg` depends on the `postgresql` alias, but for demonstration purposes this
has to suffice.
Of course for this use-case one could also use overlays since the configuration for `pg` depends on the `postgresql` alias, but for demonstration purposes this has to suffice.
#### Adding a gem to the default gemset
### Adding a gem to the default gemset
Now that you know how to get a working Ruby environment with Nix, it's time to
go forward and start actually developing with Ruby.
We will first have a look at how Ruby gems are packaged on Nix. Then, we will
look at how you can use development mode with your code.
Now that you know how to get a working Ruby environment with Nix, it's time to go forward and start actually developing with Ruby. We will first have a look at how Ruby gems are packaged on Nix. Then, we will look at how you can use development mode with your code.
All gems in the standard set are automatically generated from a single
`Gemfile`. The dependency resolution is done with `bundler` and makes it more
likely that all gems are compatible to each other.
All gems in the standard set are automatically generated from a single `Gemfile`. The dependency resolution is done with `bundler` and makes it more likely that all gems are compatible to each other.
In order to add a new gem to nixpkgs, you can put it into the
`/pkgs/development/ruby-modules/with-packages/Gemfile` and run
`./maintainers/scripts/update-ruby-packages`.
In order to add a new gem to nixpkgs, you can put it into the `/pkgs/development/ruby-modules/with-packages/Gemfile` and run `./maintainers/scripts/update-ruby-packages`.
To test that it works, you can then try using the gem with:
@ -297,16 +215,11 @@ To test that it works, you can then try using the gem with:
NIX_PATH=nixpkgs=$PWD nix-shell -p "ruby.withPackages (ps: with ps; [ name-of-your-gem ])"
```
#### Packaging applications
### Packaging applications
A common task is to add a ruby executable to nixpkgs, popular examples would be
`chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp`
function, that allows you to make a package that only exposes the listed
executables, otherwise the package may cause conflicts through common paths like
`bin/rake` or `bin/bundler` that aren't meant to be used.
A common task is to add a ruby executable to nixpkgs, popular examples would be `chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp` function, that allows you to make a package that only exposes the listed executables, otherwise the package may cause conflicts through common paths like `bin/rake` or `bin/bundler` that aren't meant to be used.
The absolute easiest way to do that is to write a
`Gemfile` along these lines:
The absolute easiest way to do that is to write a `Gemfile` along these lines:
```ruby
source 'https://rubygems.org' do
@ -314,10 +227,7 @@ source 'https://rubygems.org' do
end
```
If you want to package a specific version, you can use the standard Gemfile
syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable
version anyway, it's easier to update by simply running the `bundle lock` and
`bundix` steps again.
If you want to package a specific version, you can use the standard Gemfile syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable version anyway, it's easier to update by simply running the `bundle lock` and `bundix` steps again.
Now you can also also make a `default.nix` that looks like this:
@ -331,20 +241,15 @@ bundlerApp {
}
```
All that's left to do is to generate the corresponding `Gemfile.lock` and
`gemset.nix` as described above in the `Using an existing Gemfile` section.
All that's left to do is to generate the corresponding `Gemfile.lock` and `gemset.nix` as described above in the `Using an existing Gemfile` section.
##### Packaging executables that require wrapping
#### Packaging executables that require wrapping
Sometimes your app will depend on other executables at runtime, and tries to
find it through the `PATH` environment variable.
Sometimes your app will depend on other executables at runtime, and tries to find it through the `PATH` environment variable.
In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the
gem in another script that prefixes the `PATH`.
In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the gem in another script that prefixes the `PATH`.
Of course you could also make a custom `gemConfig` if you know exactly how to
patch it, but it's usually much easier to maintain with a simple wrapper so the
patch doesn't have to be adjusted for each version.
Of course you could also make a custom `gemConfig` if you know exactly how to patch it, but it's usually much easier to maintain with a simple wrapper so the patch doesn't have to be adjusted for each version.
Here's another example:

View file

@ -1,107 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-ruby">
<title>Ruby</title>
<para>
There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a <filename>Gemfile</filename>, let bundler create a <filename>Gemfile.lock</filename>, and then convert this into a nix expression that contains all Gem dependencies automatically.
</para>
<para>
For example, to package sensu, we did:
</para>
<screen>
<prompt>$ </prompt>cd pkgs/servers/monitoring
<prompt>$ </prompt>mkdir sensu
<prompt>$ </prompt>cd sensu
<prompt>$ </prompt>cat > Gemfile
source 'https://rubygems.org'
gem 'sensu'
<prompt>$ </prompt>$(nix-build '&lt;nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
<prompt>$ </prompt>cat > default.nix
{ lib, bundlerEnv, ruby }:
bundlerEnv rec {
name = "sensu-${version}";
version = (import gemset).sensu.version;
inherit ruby;
# expects Gemfile, Gemfile.lock and gemset.nix in the same directory
gemdir = ./.;
meta = with lib; {
description = "A monitoring framework that aims to be simple, malleable, and scalable";
homepage = "http://sensuapp.org/";
license = with licenses; mit;
maintainers = with maintainers; [ theuni ];
platforms = platforms.unix;
};
}
</screen>
<para>
Please check in the <filename>Gemfile</filename>, <filename>Gemfile.lock</filename> and the <filename>gemset.nix</filename> so future updates can be run easily.
</para>
<para>
Updating Ruby packages can then be done like this:
</para>
<screen>
<prompt>$ </prompt>cd pkgs/servers/monitoring/sensu
<prompt>$ </prompt>nix-shell -p bundler --run 'bundle lock --update'
<prompt>$ </prompt>nix-shell -p bundix --run 'bundix'
</screen>
<para>
For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. <command>rake</command> at the command line, there is an alternative builder called <literal>bundlerApp</literal>. Set up the <filename>gemset.nix</filename> the same way, and then, for example:
</para>
<programlisting>
<![CDATA[{ lib, bundlerApp }:
bundlerApp {
pname = "corundum";
gemdir = ./.;
exes = [ "corundum-skel" ];
meta = with lib; {
description = "Tool and libraries for maintaining Ruby gems.";
homepage = "https://github.com/nyarly/corundum";
license = licenses.mit;
maintainers = [ maintainers.nyarly ];
platforms = platforms.unix;
};
}]]>
</programlisting>
<para>
The chief advantage of <literal>bundlerApp</literal> over <literal>bundlerEnv</literal> is the executables introduced in the environment are precisely those selected in the <literal>exes</literal> list, as opposed to <literal>bundlerEnv</literal> which adds all the executables made available by gems in the gemset, which can mean e.g. <command>rspec</command> or <command>rake</command> in unpredictable versions available from various packages.
</para>
<para>
Resulting derivations for both builders also have two helpful attributes, <literal>env</literal> and <literal>wrappedRuby</literal>. The first one allows one to quickly drop into <command>nix-shell</command> with the specified environment present. E.g. <command>nix-shell -A sensu.env</command> would give you an environment with Ruby preset so it has all the libraries necessary for <literal>sensu</literal> in its paths. The second one can be used to make derivations from custom Ruby scripts which have <filename>Gemfile</filename>s with their dependencies specified. It is a derivation with <command>ruby</command> wrapped so it can find all the needed dependencies. For example, to make a derivation <literal>my-script</literal> for a <filename>my-script.rb</filename> (which should be placed in <filename>bin</filename>) you should run <command>bundix</command> as specified above and then use <literal>bundlerEnv</literal> like this:
</para>
<programlisting>
<![CDATA[let env = bundlerEnv {
name = "my-script-env";
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in stdenv.mkDerivation {
name = "my-script";
buildInputs = [ env.wrappedRuby ];
script = ./my-script.rb;
buildCommand = ''
install -D -m755 $script $out/bin/my-script
patchShebangs $out/bin/my-script
'';
}]]>
</programlisting>
</section>

View file

@ -63,9 +63,52 @@ The fetcher will verify that the `Cargo.lock` file is in sync with the `src`
attribute, and fail the build if not. It will also will compress the vendor
directory into a tar.gz archive.
### Building a crate for a different target
### Cross compilation
To build your crate with a different cargo `--target` simply specify the `target` attribute:
By default, Rust packages are compiled for the host platform, just like any
other package is. The `--target` passed to rust tools is computed from this.
By default, it takes the `stdenv.hostPlatform.config` and replaces components
where they are known to differ. But there are ways to customize the argument:
- To choose a different target by name, define
`stdenv.hostPlatform.rustc.config` as that name (a string), and that
name will be used instead.
For example:
```nix
import <nixpkgs> {
crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
rustc.config = "thumbv7em-none-eabi";
};
}
```
will result in:
```shell
--target thumbv7em-none-eabi
```
- To pass a completely custom target, define
`stdenv.hostPlatform.rustc.config` with its name, and
`stdenv.hostPlatform.rustc.platform` with the value. The value will be
serialized to JSON in a file called
`${stdenv.hostPlatform.rustc.config}.json`, and the path of that file
will be used instead.
For example:
```nix
import <nixpkgs> {
crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
rustc.config = "thumb-crazy";
rustc.platform = { foo = ""; bar = ""; };
};
}
will result in:
```shell
--target /nix/store/asdfasdfsadf-thumb-crazy.json # contains {"foo":"","bar":""}
```
Finally, as an ad-hoc escape hatch, a computed target (string or JSON file
path) can be passed directly to `buildRustPackage`:
```nix
pkgs.rustPlatform.buildRustPackage {
@ -74,6 +117,15 @@ pkgs.rustPlatform.buildRustPackage {
}
```
This is useful to avoid rebuilding Rust tools, since they are actually target
agnostic and don't need to be rebuilt. But in the future, we should always
build the Rust tools and standard library crates separately so there is no
reason not to take the `stdenv.hostPlatform.rustc`-modifying approach, and the
ad-hoc escape hatch to `buildRustPackage` can be removed.
Note that currently custom targets aren't compiled with `std`, so `cargo test`
will fail. This can be ignored by adding `doCheck = false;` to your derivation.
### Running package tests
When using `buildRustPackage`, the `checkPhase` is enabled by default and runs
@ -524,12 +576,13 @@ For example, you might want to add `latest.rustChannels.stable.rust` to the list
Imperatively, the latest stable version can be installed with the following command:
$ nix-env -Ai nixos.latest.rustChannels.stable.rust
$ nix-env -Ai nixpkgs.latest.rustChannels.stable.rust
Or using the attribute with nix-shell:
$ nix-shell -p nixos.latest.rustChannels.stable.rust
$ nix-shell -p nixpkgs.latest.rustChannels.stable.rust
Substitute the `nixpkgs` prefix with `nixos` on NixOS.
To install the beta or nightly channel, "stable" should be substituted by
"nightly" or "beta", or
use the function provided by this overlay to pull a version based on a

View file

@ -169,6 +169,9 @@
}
</programlisting>
</para>
<para>
Note that <literal>whitelistedLicenses</literal> only applies to unfree licenses unless <literal>allowUnfree</literal> is enabled. It is not a generic whitelist for all types of licenses. <literal>blacklistedLicenses</literal> applies to all licenses.
</para>
</listitem>
</itemizedlist>

View file

@ -2901,6 +2901,12 @@
githubId = 541748;
name = "Felipe Espinoza";
};
fehnomenal = {
email = "fehnomenal@fehn.systems";
github = "fehnomenal";
githubId = 9959940;
name = "Andreas Fehn";
};
felschr = {
email = "dev@felschr.com";
github = "felschr";
@ -4143,6 +4149,12 @@
githubId = 60272884;
name = "Jonathan Jeppener-Haltenhoff";
};
joelancaster = {
email = "joe.a.lancas@gmail.com";
github = "joelancaster";
githubId = 16760945;
name = "Joe Lancaster";
};
joelburget = {
email = "joelburget@gmail.com";
github = "joelburget";
@ -6965,6 +6977,18 @@
githubId = 138074;
name = "Pedro Pombeiro";
};
poscat = {
email = "poscat@mail.poscat.moe";
github = "poscat0x04";
githubId = 53291983;
name = "Poscat Tarski";
keys = [
{
longkeyid = "rsa4096/2D2595A00D08ACE0";
fingerprint = "48AD DE10 F27B AFB4 7BB0 CCAF 2D25 95A0 0D08 ACE0";
}
];
};
pradeepchhetri = {
email = "pradeep.chhetri89@gmail.com";
github = "pradeepchhetri";

View file

@ -147,6 +147,7 @@
./programs/npm.nix
./programs/oblogout.nix
./programs/plotinus.nix
./programs/proxychains.nix
./programs/qt5ct.nix
./programs/screen.nix
./programs/sedutil.nix

View file

@ -0,0 +1,165 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.proxychains;
configFile = ''
${cfg.chain.type}_chain
${optionalString (cfg.chain.type == "random")
"chain_len = ${builtins.toString cfg.chain.length}"}
${optionalString cfg.proxyDNS "proxy_dns"}
${optionalString cfg.quietMode "quiet_mode"}
remote_dns_subnet ${builtins.toString cfg.remoteDNSSubnet}
tcp_read_time_out ${builtins.toString cfg.tcpReadTimeOut}
tcp_connect_time_out ${builtins.toString cfg.tcpConnectTimeOut}
localnet ${cfg.localnet}
[ProxyList]
${builtins.concatStringsSep "\n"
(lib.mapAttrsToList (k: v: "${v.type} ${v.host} ${builtins.toString v.port}")
(lib.filterAttrs (k: v: v.enable) cfg.proxies))}
'';
proxyOptions = {
options = {
enable = mkEnableOption "this proxy";
type = mkOption {
type = types.enum [ "http" "socks4" "socks5" ];
description = "Proxy type.";
};
host = mkOption {
type = types.str;
description = "Proxy host or IP address.";
};
port = mkOption {
type = types.port;
description = "Proxy port";
};
};
};
in {
###### interface
options = {
programs.proxychains = {
enable = mkEnableOption "installing proxychains configuration";
chain = {
type = mkOption {
type = types.enum [ "dynamic" "strict" "random" ];
default = "strict";
description = ''
<literal>dynamic</literal> - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
at least one proxy must be online to play in chain
(dead proxies are skipped)
otherwise <literal>EINTR</literal> is returned to the app.
<literal>strict</literal> - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
all proxies must be online to play in chain
otherwise <literal>EINTR</literal> is returned to the app.
<literal>random</literal> - Each connection will be done via random proxy
(or proxy chain, see <option>programs.proxychains.chain.length</option>) from the list.
'';
};
length = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
Chain length for random chain.
'';
};
};
proxyDNS = mkOption {
type = types.bool;
default = true;
description = "Proxy DNS requests - no leak for DNS data.";
};
quietMode = mkEnableOption "Quiet mode (no output from the library).";
remoteDNSSubnet = mkOption {
type = types.enum [ 10 127 224 ];
default = 224;
description = ''
Set the class A subnet number to use for the internal remote DNS mapping, uses the reserved 224.x.x.x range by default.
'';
};
tcpReadTimeOut = mkOption {
type = types.int;
default = 15000;
description = "Connection read time-out in milliseconds.";
};
tcpConnectTimeOut = mkOption {
type = types.int;
default = 8000;
description = "Connection time-out in milliseconds.";
};
localnet = mkOption {
type = types.str;
default = "127.0.0.0/255.0.0.0";
description = "By default enable localnet for loopback address ranges.";
};
proxies = mkOption {
type = types.attrsOf (types.submodule proxyOptions);
description = ''
Proxies to be used by proxychains.
'';
example = literalExample ''
{ myproxy =
{ type = "socks4";
host = "127.0.0.1";
port = 1337;
};
}
'';
};
};
};
###### implementation
meta.maintainers = with maintainers; [ sorki ];
config = mkIf cfg.enable {
assertions = singleton {
assertion = cfg.chain.type != "random" && cfg.chain.length == null;
message = ''
Option `programs.proxychains.chain.length`
only makes sense with `programs.proxychains.chain.type` = "random".
'';
};
programs.proxychains.proxies = mkIf config.services.tor.client.enable
{
torproxy = mkDefault {
enable = true;
type = "socks4";
host = "127.0.0.1";
port = 9050;
};
};
environment.etc."proxychains.conf".text = configFile;
environment.systemPackages = [ pkgs.proxychains ];
};
}

View file

@ -34,6 +34,14 @@ in
defaultText = "pkgs.disnix";
};
enableProfilePath = mkEnableOption "exposing the Disnix profiles in the system's PATH";
profiles = mkOption {
type = types.listOf types.string;
default = [ "default" ];
example = [ "default" ];
description = "Names of the Disnix profiles to expose in the system's PATH";
};
};
};
@ -44,6 +52,7 @@ in
dysnomia.enable = true;
environment.systemPackages = [ pkgs.disnix ] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
environment.variables.PATH = lib.optionals cfg.enableProfilePath (map (profileName: "/nix/var/nix/profiles/disnix/${profileName}/bin" ) cfg.profiles);
services.dbus.enable = true;
services.dbus.packages = [ pkgs.disnix ];
@ -68,7 +77,8 @@ in
++ optional config.services.postgresql.enable "postgresql.service"
++ optional config.services.tomcat.enable "tomcat.service"
++ optional config.services.svnserve.enable "svnserve.service"
++ optional config.services.mongodb.enable "mongodb.service";
++ optional config.services.mongodb.enable "mongodb.service"
++ optional config.services.influxdb.enable "influxdb.service";
restartIfChanged = false;

View file

@ -66,6 +66,19 @@ let
) (builtins.attrNames cfg.components)}
'';
};
dysnomiaFlags = {
enableApacheWebApplication = config.services.httpd.enable;
enableAxis2WebService = config.services.tomcat.axis2.enable;
enableDockerContainer = config.virtualisation.docker.enable;
enableEjabberdDump = config.services.ejabberd.enable;
enableMySQLDatabase = config.services.mysql.enable;
enablePostgreSQLDatabase = config.services.postgresql.enable;
enableTomcatWebApplication = config.services.tomcat.enable;
enableMongoDatabase = config.services.mongodb.enable;
enableSubversionRepository = config.services.svnserve.enable;
enableInfluxDatabase = config.services.influxdb.enable;
};
in
{
options = {
@ -117,6 +130,12 @@ in
description = "A list of paths containing additional modules that are added to the search folders";
default = [];
};
enableLegacyModules = mkOption {
type = types.bool;
default = true;
description = "Whether to enable Dysnomia legacy process and wrapper modules";
};
};
};
@ -142,34 +161,48 @@ in
environment.systemPackages = [ cfg.package ];
dysnomia.package = pkgs.dysnomia.override (origArgs: {
enableApacheWebApplication = config.services.httpd.enable;
enableAxis2WebService = config.services.tomcat.axis2.enable;
enableEjabberdDump = config.services.ejabberd.enable;
enableMySQLDatabase = config.services.mysql.enable;
enablePostgreSQLDatabase = config.services.postgresql.enable;
enableSubversionRepository = config.services.svnserve.enable;
enableTomcatWebApplication = config.services.tomcat.enable;
enableMongoDatabase = config.services.mongodb.enable;
enableInfluxDatabase = config.services.influxdb.enable;
dysnomia.package = pkgs.dysnomia.override (origArgs: dysnomiaFlags // lib.optionalAttrs (cfg.enableLegacyModules) {
enableLegacy = builtins.trace ''
WARNING: Dysnomia has been configured to use the legacy 'process' and 'wrapper'
modules for compatibility reasons! If you rely on these modules, consider
migrating to better alternatives.
More information: https://raw.githubusercontent.com/svanderburg/dysnomia/f65a9a84827bcc4024d6b16527098b33b02e4054/README-legacy.md
If you have migrated already or don't rely on these Dysnomia modules, you can
disable legacy mode with the following NixOS configuration option:
dysnomia.enableLegacyModules = false;
In a future version of Dysnomia (and NixOS) the legacy option will go away!
'' true;
});
dysnomia.properties = {
hostname = config.networking.hostName;
inherit (config.nixpkgs.localSystem) system;
supportedTypes = (import "${pkgs.stdenv.mkDerivation {
name = "supportedtypes";
buildCommand = ''
( echo -n "[ "
cd ${cfg.package}/libexec/dysnomia
for i in *
do
echo -n "\"$i\" "
done
echo -n " ]") > $out
'';
}}");
supportedTypes = [
"echo"
"fileset"
"process"
"wrapper"
# These are not base modules, but they are still enabled because they work with technology that are always enabled in NixOS
"systemd-unit"
"sysvinit-script"
"nixos-configuration"
]
++ optional (dysnomiaFlags.enableApacheWebApplication) "apache-webapplication"
++ optional (dysnomiaFlags.enableAxis2WebService) "axis2-webservice"
++ optional (dysnomiaFlags.enableDockerContainer) "docker-container"
++ optional (dysnomiaFlags.enableEjabberdDump) "ejabberd-dump"
++ optional (dysnomiaFlags.enableInfluxDatabase) "influx-database"
++ optional (dysnomiaFlags.enableMySQLDatabase) "mysql-database"
++ optional (dysnomiaFlags.enablePostgreSQLDatabase) "postgresql-database"
++ optional (dysnomiaFlags.enableTomcatWebApplication) "tomcat-webapplication"
++ optional (dysnomiaFlags.enableMongoDatabase) "mongo-database"
++ optional (dysnomiaFlags.enableSubversionRepository) "subversion-repository";
};
dysnomia.containers = lib.recursiveUpdate ({
@ -185,9 +218,9 @@ in
}; }
// lib.optionalAttrs (config.services.mysql.enable) { mysql-database = {
mysqlPort = config.services.mysql.port;
mysqlSocket = "/run/mysqld/mysqld.sock";
} // lib.optionalAttrs cfg.enableAuthentication {
mysqlUsername = "root";
mysqlPassword = builtins.readFile (config.services.mysql.rootPassword);
};
}
// lib.optionalAttrs (config.services.postgresql.enable) { postgresql-database = {
@ -199,6 +232,13 @@ in
tomcatPort = 8080;
}; }
// lib.optionalAttrs (config.services.mongodb.enable) { mongo-database = {}; }
// lib.optionalAttrs (config.services.influxdb.enable) {
influx-database = {
influxdbUsername = config.services.influxdb.user;
influxdbDataDir = "${config.services.influxdb.dataDir}/data";
influxdbMetaDir = "${config.services.influxdb.dataDir}/meta";
};
}
// lib.optionalAttrs (config.services.svnserve.enable) { subversion-repository = {
svnBaseDir = config.services.svnserve.svnBaseDir;
}; }) cfg.extraContainerProperties;

View file

@ -245,7 +245,11 @@ in {
Group = "hass";
Restart = "on-failure";
ProtectSystem = "strict";
ReadWritePaths = "${cfg.configDir}";
ReadWritePaths = let
cfgPath = [ "config" "homeassistant" "allowlist_external_dirs" ];
value = attrByPath cfgPath [] cfg;
allowPaths = if isList value then value else singleton value;
in [ "${cfg.configDir}" ] ++ allowPaths;
KillSignal = "SIGINT";
PrivateTmp = true;
RemoveIPC = true;

View file

@ -232,6 +232,16 @@ in
Restart = "on-failure";
ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ProtectSystem = "strict";
ProtectHome = true;
PrivateDevices = true;
PrivateTmp = true;
ReadWritePaths = "${cfg.dataDir}";
ProtectControlGroups = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
NoNewPrivileges = true;
};
preStart = ''
rm -f ${cfg.dataDir}/passwd

View file

@ -30,6 +30,7 @@ in
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };
awscli = handleTest ./awscli.nix { };
babeld = handleTest ./babeld.nix {};
bat = handleTest ./bat.nix {};
bazarr = handleTest ./bazarr.nix {};
bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64
beanstalkd = handleTest ./beanstalkd.nix {};
@ -171,6 +172,7 @@ in
jenkins = handleTest ./jenkins.nix {};
jirafeau = handleTest ./jirafeau.nix {};
jitsi-meet = handleTest ./jitsi-meet.nix {};
jq = handleTest ./jq.nix {};
k3s = handleTest ./k3s.nix {};
kafka = handleTest ./kafka.nix {};
keepalived = handleTest ./keepalived.nix {};
@ -194,6 +196,7 @@ in
limesurvey = handleTest ./limesurvey.nix {};
login = handleTest ./login.nix {};
loki = handleTest ./loki.nix {};
lsd = handleTest ./lsd.nix {};
lxd = handleTest ./lxd.nix {};
lxd-nftables = handleTest ./lxd-nftables.nix {};
#logstash = handleTest ./logstash.nix {};
@ -208,6 +211,8 @@ in
mediawiki = handleTest ./mediawiki.nix {};
memcached = handleTest ./memcached.nix {};
metabase = handleTest ./metabase.nix {};
minecraft = handleTest ./minecraft.nix {};
minecraft-server = handleTest ./minecraft-server.nix {};
miniflux = handleTest ./miniflux.nix {};
minio = handleTest ./minio.nix {};
minidlna = handleTest ./minidlna.nix {};

12
nixos/tests/bat.nix Normal file
View file

@ -0,0 +1,12 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "bat";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.bat ]; };
testScript = ''
machine.succeed("echo 'Foobar\n\n\n42' > /tmp/foo")
assert "Foobar" in machine.succeed("bat -p /tmp/foo")
assert "42" in machine.succeed("bat -p /tmp/foo -r 4:4")
'';
})

10
nixos/tests/jq.nix Normal file
View file

@ -0,0 +1,10 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "jq";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.jq = { pkgs, ... }: { environment.systemPackages = [ pkgs.jq ]; };
testScript = ''
assert "world" in jq.succeed('echo \'{"values":["hello","world"]}\'| jq \'.values[1]\''')
'';
})

12
nixos/tests/lsd.nix Normal file
View file

@ -0,0 +1,12 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "lsd";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.lsd = { pkgs, ... }: { environment.systemPackages = [ pkgs.lsd ]; };
testScript = ''
lsd.succeed('echo "abc" > /tmp/foo')
assert "4 B /tmp/foo" in lsd.succeed('lsd --classic --blocks "size,name" /tmp/foo')
assert "lsd ${pkgs.lsd.version}" in lsd.succeed("lsd --version")
'';
})

View file

@ -0,0 +1,37 @@
let
seed = "2151901553968352745";
rcon-pass = "foobar";
rcon-port = 43000;
in import ./make-test-python.nix ({ pkgs, ... }: {
name = "minecraft-server";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.server = { ... }: {
environment.systemPackages = [ pkgs.mcrcon ];
nixpkgs.config.allowUnfree = true;
services.minecraft-server = {
declarative = true;
enable = true;
eula = true;
serverProperties = {
enable-rcon = true;
level-seed = seed;
online-mode = false;
"rcon.password" = rcon-pass;
"rcon.port" = rcon-port;
};
};
virtualisation.memorySize = 2048;
};
testScript = ''
server.wait_for_unit("minecraft-server")
server.wait_for_open_port(${toString rcon-port})
assert "${seed}" in server.succeed(
"mcrcon -H localhost -P ${toString rcon-port} -p '${rcon-pass}' -c 'seed'"
)
'';
})

28
nixos/tests/minecraft.nix Normal file
View file

@ -0,0 +1,28 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "minecraft";
meta = with lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.client = { nodes, ... }:
let user = nodes.client.config.users.users.alice;
in {
imports = [ ./common/user-account.nix ./common/x11.nix ];
environment.systemPackages = [ pkgs.minecraft ];
nixpkgs.config.allowUnfree = true;
test-support.displayManager.auto.user = user.name;
};
enableOCR = true;
testScript = { nodes, ... }:
let user = nodes.client.config.users.users.alice;
in ''
client.wait_for_x()
client.execute("su - alice -c minecraft-launcher &")
client.wait_for_text("CONTINUE WITHOUT LOGIN")
client.sleep(10)
client.screenshot("launcher")
'';
})

View file

@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, autoreconfHook, boost, flac, id3lib, pkg-config
, taglib, zlib }:
stdenv.mkDerivation rec {
pname = "dsf2flac";
version = "unstable-2018-01-02";
src = fetchFromGitHub {
owner = "hank";
repo = pname;
rev = "b0cf5aa6ddc60df9bbfeed25548e443c99f5cb16";
sha256 = "15j5f82v7lgs0fkgyyynl82cb1rsxyr9vw3bpzra63nacbi9g8lc";
};
buildInputs = [ boost flac id3lib taglib zlib ];
nativeBuildInputs = [ autoreconfHook pkg-config ];
enableParallelBuilding = true;
preConfigure = ''
export LIBS="$LIBS -lz"
'';
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ];
meta = with stdenv.lib; {
description = "A DSD to FLAC transcoding tool";
homepage = "https://github.com/hank/dsf2flac";
license = licenses.gpl2;
maintainers = with maintainers; [ dmrauh ];
platforms = with platforms; linux;
};
}

View file

@ -13,8 +13,7 @@ with pythonPackages; buildPythonApplication rec {
sha256 = "0bdzgh2k1ppgcvqiasxwp3w89q44s4jgwjidlips3ixx1bzm822v";
};
buildInputs = with pythonPackages; [ feedparser ];
propagatedBuildInputs = buildInputs;
propagatedBuildInputs = [ setuptools feedparser ];
meta = with stdenv.lib; {
homepage = "https://github.com/manolomartinez/greg";

View file

@ -1,14 +1,15 @@
{ mkDerivation, stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmake
{ mkDerivation, lib, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmake
}:
mkDerivation {
mkDerivation rec {
pname = "iannix";
version = "2016-01-31";
version = "0.9.20-b";
src = fetchFromGitHub {
owner = "iannix";
repo = "IanniX";
rev = "f84becdcbe154b20a53aa2622068cb8f6fda0755";
sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj";
rev = "v${version}";
sha256 = "6jjgMvD2VkR3ztU5LguqhtNd+4/ZqRy5pVW5xQ6K20Q=";
};
nativeBuildInputs = [ pkgconfig qmake ];
@ -20,11 +21,11 @@ mkDerivation {
enableParallelBuilding = true;
meta = {
description = "Graphical open-source sequencer,";
meta = with lib; {
description = "Graphical open-source sequencer";
homepage = "https://www.iannix.org/";
license = stdenv.lib.licenses.lgpl3;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.nico202 ];
license = licenses.lgpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ freezeboy ];
};
}

View file

@ -3,12 +3,12 @@
mkDerivation rec {
pname = "jamulus";
version = "3.6.0";
version = "3.6.1";
src = fetchFromGitHub {
owner = "corrados";
repo = "jamulus";
rev = "r${stdenv.lib.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "06x9b2kjsgk8kddhif0x59nwzhnwjmq40x3w5nrphqaimqlrhlcf";
sha256 = "11rwgd2car7ziqa0vancb363m4ca94pj480jfxywd6d81139jl15";
};
nativeBuildInputs = [ pkg-config qmake ];

View file

@ -11,11 +11,11 @@
stdenv.mkDerivation rec {
pname = "ocenaudio";
version = "3.9.5";
version = "3.9.6";
src = fetchurl {
url = "https://www.ocenaudio.com/downloads/index.php/ocenaudio_debian9_64.deb?version=${version}";
sha256 = "13hvdfydlgp2qf49ddhdzghz5jkyx1rhnsj8sf8khfxf9k8phkjd";
sha256 = "07r49133kk99ya4grwby3admy892mkk9cfxz3wh0v81aznhpw4jg";
};

View file

@ -355,9 +355,6 @@ rec {
url = "https://download.jboss.org/drools/release/${version}/droolsjbpm-tools-distribution-${version}.zip";
sha512 = "2qzc1iszqfrfnw8xip78n3kp6hlwrvrr708vlmdk7nv525xhs0ssjaxriqdhcr0s6jripmmazxivv3763rnk2bfkh31hmbnckpx4r3m";
extraPostFetch = ''
# work around https://github.com/NixOS/nixpkgs/issues/38649
chmod go-w $out;
# update site is a couple levels deep, alongside some other irrelevant stuff
cd $out;
find . -type f -not -path ./binaries/org.drools.updatesite/\* -exec rm {} \;

View file

@ -90,7 +90,7 @@ let
It allows you to quickly migrate and refactor relational databases,
construct efficient, statically checked SQL queries and much more.
'';
maintainers = with maintainers; [ loskutov ];
maintainers = with maintainers; [ ];
platforms = platforms.linux;
};
});
@ -268,12 +268,12 @@ in
clion = buildClion rec {
name = "clion-${version}";
version = "2020.2.4"; /* updated by script */
version = "2020.2.5"; /* updated by script */
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
sha256 = "0xkra8l3ga8qsmzbvfisn99lxm5wxa8c4d4jzljjwn8855bs20a3"; /* updated by script */
sha256 = "0j7gxh8wqshn2i1f22bl9099sx8a4092qwkp4fwny4649rbkfyrz"; /* updated by script */
};
wmClass = "jetbrains-clion";
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
@ -281,12 +281,12 @@ in
datagrip = buildDataGrip rec {
name = "datagrip-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.3"; /* updated by script */
description = "Your Swiss Army Knife for Databases and SQL";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
sha256 = "0iv1zmdpbqk8f4cjd6dhgj9mrvxli4dg83jzkhv566sy8wrrx7kb"; /* updated by script */
sha256 = "1j0mlsiqh80mspi2x9mi0h5hxhg5gw6395hyl9w33q8dxm95mx2d"; /* updated by script */
};
wmClass = "jetbrains-datagrip";
update-channel = "DataGrip RELEASE";
@ -307,12 +307,12 @@ in
idea-community = buildIdea rec {
name = "idea-community-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
sha256 = "092swkz7l1p3asrna6fxj6j324sh7pdbgzrlapdwka8kq9y40ajz"; /* updated by script */
sha256 = "1rlw01aq6ci46xv4d4877k30309jjws29kwhriy98xf804msyzyb"; /* updated by script */
};
wmClass = "jetbrains-idea-ce";
update-channel = "IntelliJ IDEA RELEASE";
@ -320,12 +320,12 @@ in
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
sha256 = "1416ikna169d2hx77yd0bb8hpxkpnf27jgyq5yrgla1w6h1fp1p0"; /* updated by script */
sha256 = "05qr8jiasqxmkgi9v52g7hgpdf7pkkjcp42bbkh1f4zgvq81p5py"; /* updated by script */
};
wmClass = "jetbrains-idea";
update-channel = "IntelliJ IDEA RELEASE";
@ -346,12 +346,12 @@ in
phpstorm = buildPhpStorm rec {
name = "phpstorm-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Professional IDE for Web and PHP developers";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
sha256 = "0bdxmxml6337cdpb2amhdqlvxicng50cgzlnmiw0wqnmwj5ihpih"; /* updated by script */
sha256 = "111dr1a6695msh13cd484yk671jnh2ps6q1k2dl0kmryk9dqnvhd"; /* updated by script */
};
wmClass = "jetbrains-phpstorm";
update-channel = "PhpStorm RELEASE";
@ -359,12 +359,12 @@ in
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "PyCharm Community Edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "0wqhcag32fxqxg6aml2a3d0rpds0d48rgbcl7cp0ah8xj6x72047"; /* updated by script */
sha256 = "196hhb4n52a50w50awx01ksyl5dkrbdmnz8sb9di5ihni7043p97"; /* updated by script */
};
wmClass = "jetbrains-pycharm-ce";
update-channel = "PyCharm RELEASE";
@ -372,12 +372,12 @@ in
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "PyCharm Professional Edition";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
sha256 = "0g7bki4bzi3a1w3rlwik2w0ma10xb4g450qxm4fr4fp8dy2xaysc"; /* updated by script */
sha256 = "0dwd9gvi8n3igza95pil3mf7azxn131830rvfzdvnvrzj9yb2q8l"; /* updated by script */
};
wmClass = "jetbrains-pycharm";
update-channel = "PyCharm RELEASE";
@ -398,12 +398,12 @@ in
ruby-mine = buildRubyMine rec {
name = "ruby-mine-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "The Most Intelligent Ruby and Rails IDE";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
sha256 = "03f1z7xhz90j9l8xp3il115yvb15kda0i6ba5ndhby7nf52vnphk"; /* updated by script */
sha256 = "0bpkl8phc16yjm7qjfbg42rm7sbfwbrjva7w0qiwiw9ibwvs90id"; /* updated by script */
};
wmClass = "jetbrains-rubymine";
update-channel = "RubyMine RELEASE";
@ -411,12 +411,12 @@ in
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
version = "2020.2.3"; /* updated by script */
version = "2020.2.4"; /* updated by script */
description = "Professional IDE for Web and JavaScript development";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
sha256 = "1c60k38ai63s4779fs55vaiswfc6bi7ki6p96hrmmkrnpzgsipg5"; /* updated by script */
sha256 = "0l97nk9psb8g0sxm148fcz0x2v9mwqblffigrz2rmac3gd275s7f"; /* updated by script */
};
wmClass = "jetbrains-webstorm";
update-channel = "WebStorm RELEASE";

View file

@ -1,6 +1,6 @@
{
mkDerivation, lib, kdepimTeam,
extra-cmake-modules, shared-mime-info,
extra-cmake-modules, shared-mime-info, qtbase,
boost, kcompletion, kconfigwidgets, kcrash, kdbusaddons, kdesignerplugin,
ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mysql, qttools,
}:
@ -10,6 +10,7 @@ mkDerivation {
meta = {
license = [ lib.licenses.lgpl21 ];
maintainers = kdepimTeam;
broken = lib.versionOlder qtbase.version "5.13";
};
patches = [
./0001-akonadi-paths.patch

View file

@ -8,6 +8,7 @@ mkDerivation {
meta = {
license = with lib.licenses; [ lgpl21 ];
maintainers = [ lib.maintainers.bkchr ];
broken = lib.versionOlder qtbase.version "5.13";
};
nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
buildInputs = [ qtbase karchive ];

View file

@ -1,24 +1,26 @@
diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -35,7 +35,6 @@ else()
@@ -80,7 +80,6 @@ else()
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
endif()
if(NOT EXISTS "${LIBDIR}/")
- message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif()
if(WITH_OPENAL)
@@ -86,7 +85,7 @@ endif()
if(WITH_CODEC_SNDFILE)
set(LIBSNDFILE ${LIBDIR}/sndfile)
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
- set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
+ set(LIBSNDFILE_LIBRARIES sndfile)
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
endif()
# -------------------------------------------------------------------------
@@ -112,10 +111,6 @@ if(WITH_CODEC_SNDFILE)
find_library(_sndfile_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib)
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
list(APPEND LIBSNDFILE_LIBRARIES
- ${_sndfile_FLAC_LIBRARY}
- ${_sndfile_OGG_LIBRARY}
- ${_sndfile_VORBIS_LIBRARY}
- ${_sndfile_VORBISENC_LIBRARY}
)
@@ -97,7 +96,7 @@ if(WITH_PYTHON)
print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
@@ -132,7 +127,7 @@ if(WITH_PYTHON)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
@ -27,40 +29,18 @@ diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platf
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
@@ -162,10 +161,7 @@ if(WITH_CODEC_FFMPEG)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
set(FFMPEG_LIBRARIES
@@ -173,9 +168,7 @@ endif()
if(WITH_CODEC_FFMPEG)
set(FFMPEG_FIND_COMPONENTS
avcodec avdevice avformat avutil
- mp3lame swscale x264 xvidcore
- theora theoradec theoraenc
- vorbis vorbisenc vorbisfile ogg opus
- vpx swresample)
+ swscale swresample)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
- mp3lame ogg opus swresample swscale
- theora theoradec theoraenc vorbis vorbisenc
- vorbisfile vpx x264 xvidcore)
+ swresample swscale)
find_package(FFmpeg)
endif()
@@ -206,14 +202,14 @@ if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/opencollada)
set(OPENCOLLADA_INCLUDE_DIRS
- ${LIBDIR}/opencollada/include/COLLADAStreamWriter
- ${LIBDIR}/opencollada/include/COLLADABaseUtils
- ${LIBDIR}/opencollada/include/COLLADAFramework
- ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
- ${LIBDIR}/opencollada/include/GeneratedSaxParser
+ ${LIBDIR}/opencollada/include/opencollada/COLLADAStreamWriter
+ ${LIBDIR}/opencollada/include/opencollada/COLLADABaseUtils
+ ${LIBDIR}/opencollada/include/opencollada/COLLADAFramework
+ ${LIBDIR}/opencollada/include/opencollada/COLLADASaxFrameworkLoader
+ ${LIBDIR}/opencollada/include/opencollada/GeneratedSaxParser
)
- set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+ set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada)
set(OPENCOLLADA_LIBRARIES
OpenCOLLADASaxFrameworkLoader
-lOpenCOLLADAFramework
@@ -277,14 +273,13 @@ if(WITH_BOOST)
@@ -266,7 +259,6 @@ if(WITH_BOOST)
endif()
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
@ -68,25 +48,8 @@ diff a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platf
endif()
if(WITH_OPENIMAGEIO)
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES
- ${OPENIMAGEIO}/lib/libOpenImageIO.a
+ ${OPENIMAGEIO}/lib/libOpenImageIO.dylib
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${TIFF_LIBRARY}
@@ -307,7 +302,7 @@ endif()
if(WITH_OPENCOLORIO)
set(OPENCOLORIO ${LIBDIR}/opencolorio)
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
- set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
+ set(OPENCOLORIO_LIBRARIES OpenColorIO)
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
endif()
@@ -443,7 +438,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
@@ -439,7 +431,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic")
endif()
-if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)

View file

@ -1,4 +1,4 @@
{ config, stdenv, lib, fetchurl, boost, cmake, ffmpeg_3, gettext, glew
{ config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
, ilmbase, libXi, libX11, libXext, libXrender
, libjpeg, libpng, libsamplerate, libsndfile
, libtiff, libGLU, libGL, openal, opencolorio, openexr, openimagedenoise, openimageio2, openjpeg, python3Packages
@ -8,7 +8,7 @@
, cudaSupport ? config.cudaSupport or false, cudatoolkit
, colladaSupport ? true, opencollada
, makeWrapper
, pugixml, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
, pugixml, llvmPackages, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
, embree, gmp
}:
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ] ++ optional cudaSupport addOpenGLRunpath;
buildInputs =
[ boost ffmpeg_3 gettext glew ilmbase
[ boost ffmpeg gettext glew ilmbase
freetype libjpeg libpng libsamplerate libsndfile libtiff
opencolorio openexr openimagedenoise openimageio2 openjpeg python zlib fftw jemalloc
alembic
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
openvdb
]
else [
pugixml SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
pugixml llvmPackages.openmp SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
])
++ optional jackaudioSupport libjack2
++ optional cudaSupport cudatoolkit
@ -61,7 +61,9 @@ stdenv.mkDerivation rec {
: > build_files/cmake/platform/platform_apple_xcode.cmake
substituteInPlace source/creator/CMakeLists.txt \
--replace '${"$"}{LIBDIR}/python' \
'${python}'
'${python}' \
--replace '${"$"}{LIBDIR}/openmp' \
'${llvmPackages.openmp}'
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
--replace 'set(PYTHON_VERSION 3.7)' \
'set(PYTHON_VERSION ${python.pythonVersion})' \
@ -72,15 +74,7 @@ stdenv.mkDerivation rec {
--replace '${"$"}{LIBDIR}/opencollada' \
'${opencollada}' \
--replace '${"$"}{PYTHON_LIBPATH}/site-packages/numpy' \
'${python3Packages.numpy}/${python.sitePackages}/numpy' \
--replace 'set(OPENJPEG_INCLUDE_DIRS ' \
'set(OPENJPEG_INCLUDE_DIRS "'$(echo ${openjpeg.dev}/include/openjpeg-*)'") #' \
--replace 'set(OPENJPEG_LIBRARIES ' \
'set(OPENJPEG_LIBRARIES "${openjpeg}/lib/libopenjp2.dylib") #' \
--replace 'set(OPENIMAGEIO ' \
'set(OPENIMAGEIO "${openimageio2.out}") #' \
--replace 'set(OPENEXR_INCLUDE_DIRS ' \
'set(OPENEXR_INCLUDE_DIRS "${openexr.dev}/include/OpenEXR") #'
'${python3Packages.numpy}/${python.sitePackages}/numpy'
'' else ''
substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
'');

View file

@ -1,6 +1,6 @@
{ fetchFromGitHub, fetchpatch, stdenv
, autoreconfHook, intltool, pkgconfig
, gtk3, xdotool, which, wrapGAppsHook }:
, gtk3, libayatana-appindicator, xdotool, which, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "clipit";
@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ pkgconfig wrapGAppsHook autoreconfHook intltool ];
configureFlags = [ "--with-gtk3" ];
buildInputs = [ gtk3 ];
configureFlags = [ "--with-gtk3" "--enable-appindicator=yes" ];
buildInputs = [ gtk3 libayatana-appindicator ];
gappsWrapperArgs = [
"--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ xdotool which ]}"

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, openssl }:
let
version = "6.4.13";
version = "6.4.14";
in
stdenv.mkDerivation {
pname = "fetchmail";
@ -9,7 +9,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "mirror://sourceforge/fetchmail/fetchmail-${version}.tar.xz";
sha256 = "1qablzgwx3a516vdhckx3pv716x9r7nyfyr6fbncif861c3cya3x";
sha256 = "1jxxb3qyrh7118fwqa3bhirjh97j2w8r71s8vcb6vp3w1wwhfis2";
};
buildInputs = [ openssl ];

View file

@ -5,7 +5,7 @@
, gettext
, fetchFromGitLab
, python3
, libhandy
, libhandy_0
, libpwquality
, wrapGAppsHook
, gtk3
@ -44,7 +44,7 @@ python3.pkgs.buildPythonApplication rec {
gtk3
glib
gdk-pixbuf
libhandy
libhandy_0
];
propagatedBuildInputs = with python3.pkgs; [

View file

@ -2,13 +2,13 @@
mkDerivation rec {
pname = "gpxsee";
version = "7.36";
version = "7.37";
src = fetchFromGitHub {
owner = "tumic0";
repo = "GPXSee";
rev = version;
sha256 = "18vsw6hw6kn5wmr4iarhx1v8q455j60fhf0hq69jkfyarl56b99j";
sha256 = "0fpb43smh0kwic5pdxs46c0hkqj8g084h72pa024x1my6w12y9b8";
};
patches = (substituteAll {

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perlPackages, gettext, makeWrapper, PerlMagick, which
{ stdenv, fetchurl, perlPackages, gettext, makeWrapper, PerlMagick, which, highlight
, gitSupport ? false, git ? null
, docutilsSupport ? false, python ? null, docutils ? null
, monotoneSupport ? false, monotone ? null
@ -19,7 +19,7 @@ assert mercurialSupport -> (mercurial != null);
let
name = "ikiwiki";
version = "3.20190228";
version = "3.20200202.3";
lib = stdenv.lib;
in
@ -28,10 +28,10 @@ stdenv.mkDerivation {
src = fetchurl {
url = "mirror://debian/pool/main/i/ikiwiki/${name}_${version}.orig.tar.xz";
sha256 = "17pyblaqhkb61lxl63bzndiffism8k859p54k3k4sghclq6lsynh";
sha256 = "0skrc8r4wh4mjfgw1c94awr5sacfb9nfsbm4frikanc9xsy16ksr";
};
buildInputs = [ which ]
buildInputs = [ which highlight ]
++ (with perlPackages; [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate
TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder LocaleGettext
RpcXML XMLSimple PerlMagick YAML YAMLLibYAML HTMLTree AuthenPassphrase
@ -62,13 +62,14 @@ stdenv.mkDerivation {
postInstall = ''
for a in "$out/bin/"*; do
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perlPackages.perl}/bin:$out/bin \
${lib.optionalString gitSupport ''--prefix PATH : ${git}/bin \''}
${lib.optionalString monotoneSupport ''--prefix PATH : ${monotone}/bin \''}
${lib.optionalString bazaarSupport ''--prefix PATH : ${breezy}/bin \''}
${lib.optionalString cvsSupport ''--prefix PATH : ${cvs}/bin \''}
${lib.optionalString cvsSupport ''--prefix PATH : ${cvsps}/bin \''}
${lib.optionalString subversionSupport ''--prefix PATH : ${subversion.out}/bin \''}
${lib.optionalString mercurialSupport ''--prefix PATH : ${mercurial}/bin \''}
${lib.optionalString gitSupport ''--prefix PATH : ${git}/bin ''} \
${lib.optionalString monotoneSupport ''--prefix PATH : ${monotone}/bin ''} \
${lib.optionalString bazaarSupport ''--prefix PATH : ${breezy}/bin ''} \
${lib.optionalString cvsSupport ''--prefix PATH : ${cvs}/bin ''} \
${lib.optionalString cvsSupport ''--prefix PATH : ${cvsps}/bin ''} \
${lib.optionalString subversionSupport ''--prefix PATH : ${subversion.out}/bin ''} \
${lib.optionalString mercurialSupport ''--prefix PATH : ${mercurial}/bin ''} \
${lib.optionalString docutilsSupport ''--prefix PYTHONPATH : "$(toPythonPath ${docutils})" ''} \
${lib.concatMapStrings (x: "--prefix PATH : ${x}/bin ") extraUtils}
done
'';

View file

@ -1,10 +1,28 @@
diff --git a/t/mdwn.t b/t/mdwn.t
index ca3180139..d64750403 100755
index 966aad2..2756173 100755
--- a/t/mdwn.t
+++ b/t/mdwn.t
@@ -16,32 +16,17 @@ is(IkiWiki::htmlize("foo", "foo", "mdwn",
"C. S. Lewis wrote books\n"),
"<p>C. S. Lewis wrote books</p>\n", "alphalist off by default");
@@ -22,30 +22,13 @@ foreach my $multimarkdown (qw(1 0)) {
"<p>C. S. Lewis wrote books</p>\n",
"alphalist off by default for multimarkdown = $multimarkdown");
- like(IkiWiki::htmlize("foo", "foo", "mdwn",
- "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
- qr{<p>This works.*fnref:1.*},
- "footnotes on by default for multimarkdown = $multimarkdown");
-
$config{mdwn_footnotes} = 0;
unlike(IkiWiki::htmlize("foo", "foo", "mdwn",
"An unusual link label: [^1]\n\n[^1]: http://example.com/\n"),
qr{<p>An unusual link label: .*fnref:1.*},
"footnotes can be disabled for multimarkdown = $multimarkdown");
-
- $config{mdwn_footnotes} = 1;
- like(IkiWiki::htmlize("foo", "foo", "mdwn",
- "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
- qr{<p>This works.*fnref:1.*},
- "footnotes can be enabled for multimarkdown = $multimarkdown");
}
-$config{mdwn_alpha_lists} = 1;
-like(IkiWiki::htmlize("foo", "foo", "mdwn",
@ -15,23 +33,3 @@ index ca3180139..d64750403 100755
$config{mdwn_alpha_lists} = 0;
like(IkiWiki::htmlize("foo", "foo", "mdwn",
"A. One\n".
"B. Two\n"),
qr{<p>A. One\sB. Two</p>\n}, "alphalist can be disabled");
-like(IkiWiki::htmlize("foo", "foo", "mdwn",
- "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
- qr{<p>This works<sup\W}, "footnotes on by default");
-
$config{mdwn_footnotes} = 0;
like(IkiWiki::htmlize("foo", "foo", "mdwn",
"An unusual link label: [^1]\n\n[^1]: http://example.com/\n"),
qr{<a href="http://example\.com/">\^1</a>}, "footnotes can be disabled");
-$config{mdwn_footnotes} = 1;
-like(IkiWiki::htmlize("foo", "foo", "mdwn",
- "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
- qr{<p>This works<sup\W}, "footnotes can be enabled");
-
SKIP: {
skip 'set $IKIWIKI_TEST_ASSUME_MODERN_DISCOUNT if you have Discount 2.2.0+', 4
unless $ENV{IKIWIKI_TEST_ASSUME_MODERN_DISCOUNT};

View file

@ -8,7 +8,6 @@ stdenv.mkDerivation rec {
src = fetchzip {
url = "https://www.supermicro.com/wftp/utility/IPMICFG/IPMICFG_${version}_build.${buildVersion}.zip";
sha256 = "0srkzivxa4qlf3x9zdkri7xfq7kjj4fsmn978vzmzsvbxkqswd5a";
extraPostFetch = "chmod u+rwX,go-rwx+X $out/";
};
installPhase = ''

View file

@ -2,7 +2,7 @@
let
pname = "joplin-desktop";
version = "1.3.18";
version = "1.4.15";
name = "${pname}-${version}";
inherit (stdenv.hostPlatform) system;
@ -16,8 +16,8 @@ let
src = fetchurl {
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}.${suffix}";
sha256 = {
x86_64-linux = "1dldy137ia8qxhf7d5xzq5slm12bhnmw4kx7fm37n1ajjdcn5sf7";
x86_64-darwin = "0zm9vhxlfs1ldd8za4yha54psqwl0al4hzdfxjfp7ir98i9a4cj7";
x86_64-linux = "12wh7f1a9sn250lqnb8c9b5gqr8r76kxrhl0kgsm2lg93jgpvvbb";
x86_64-darwin = "1jzfqwyz3vkmmkdzx3iw36fbjq7fns46v8crmg5n09w9kvf22qil";
}.${system} or throwSystem;
};
@ -52,9 +52,9 @@ let
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -Dm444 ${appimageContents}/joplin.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/joplin.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/joplin.desktop \
install -Dm444 ${appimageContents}/@joplinapp-desktop.desktop -t $out/share/applications
install -Dm444 ${appimageContents}/@joplinapp-desktop.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/@joplinapp-desktop.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
};

View file

@ -6,11 +6,11 @@ let
cerberus_1_1 = callPackage ./cerberus.nix { };
in buildPythonApplication rec {
pname = "pyditz";
version = "0.10.3";
version = "0.11";
src = fetchPypi {
inherit pname version;
sha256 = "0hxxz7kxv9gsrr86ccsc31g7bc2agw1ihbxhd659c2m6nrqq5qaf";
sha256 = "da0365ae9064e30c4a27526fb0d7a802fda5c8651cda6990d17be7ede89a2551";
};
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [ pyyaml six jinja2 cerberus_1_1 ];

View file

@ -0,0 +1,24 @@
{ stdenv, rustPlatform, fetchFromGitHub, perl }:
rustPlatform.buildRustPackage rec {
pname = "tickrs";
version = "0.7.1";
src = fetchFromGitHub {
owner = "tarkah";
repo = pname;
rev = "v${version}";
sha256 = "159smcjrf5193yijfpvy1g9b1gin72xwbjghfyrrphwscwhb215z";
};
cargoSha256 = "1s95b3x7vs1z8xs7j6j80y6mfpy5bdgnzmzn3qa9zr6cghabbf6n";
nativeBuildInputs = [ perl ];
meta = with stdenv.lib; {
description = "Realtime ticker data in your terminal";
homepage = "https://github.com/tarkah/tickrs";
license = licenses.mit;
maintainers = with maintainers; [ mredaelli ];
};
}

View file

@ -139,6 +139,7 @@ buildEnv {
paths = [ desktopItem toggldesktop-icons toggldesktop-wrapped ];
meta = with lib; {
broken = true; # libtoggl is broken
description = "Client for Toggl time tracking service";
homepage = "https://github.com/toggl/toggldesktop";
license = licenses.bsd3;

View file

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "xmrig";
version = "6.5.3";
version = "6.6.1";
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
sha256 = "0hywdb6zzkmiik93bnsw6pzir7189mnm46brg4v8fyn56vxskfmi";
sha256 = "03phq1c6fylvkg5x7l0bskspr9jdfx61jy67yx2lxhymqgpbf64z";
};
nativeBuildInputs = [ cmake ];

View file

@ -26,6 +26,7 @@
, libXext
, libXfixes
, libXi
, libxkbcommon
, libXrandr
, libXrender
, libXScrnSaver
@ -61,6 +62,7 @@ rpath = lib.makeLibraryPath [
libdrm
libpulseaudio
libX11
libxkbcommon
libXScrnSaver
libXcomposite
libXcursor
@ -68,6 +70,7 @@ rpath = lib.makeLibraryPath [
libXext
libXfixes
libXi
libxkbcommon
libXrandr
libXrender
libXtst
@ -86,11 +89,11 @@ in
stdenv.mkDerivation rec {
pname = "brave";
version = "1.16.76";
version = "1.17.73";
src = fetchurl {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
sha256 = "1nbgiwflmr3ik428yarmnpx10dmqai2m4k910miqd92mwmfb0pib";
sha256 = "18bd6kgzfza5r0y2ggfy82pdpnfr2hzgjcfy9vxqq658z7q3jpqy";
};
dontConfigure = true;

View file

@ -20,13 +20,13 @@
stdenv.mkDerivation rec {
pname = "ephemeral";
version = "6.4.1";
version = "7.0.4";
src = fetchFromGitHub {
owner = "cassidyjames";
repo = "ephemeral";
rev = version;
sha256 = "1lzcwaczh601kwbx7fzg32nrzlg67asby7p86qy10qz86xf4g608";
sha256 = "18chvfdmka21zvjgqfpinm3nrj0ba09szxhhm39anpvpbj92ra8j";
};
nativeBuildInputs = [

View file

@ -150,10 +150,10 @@ in stdenv.mkDerivation {
description = "A freeware web browser developed by Google";
homepage = "https://www.google.com/chrome/browser/";
license = licenses.unfree;
maintainers = with maintainers; [ primeos msteen ];
maintainers = with maintainers; [ primeos ];
# Note from primeos: By updating Chromium I also update Google Chrome and
# will try to merge PRs and respond to issues but I'm not actually using
# Google Chrome. msteen is the actual user/maintainer.
# Google Chrome.
platforms = [ "x86_64-linux" ];
};
}

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.17.11";
version = "0.17.12";
src = fetchFromGitHub {
owner = "tilt-dev";
repo = pname;
rev = "v${version}";
sha256 = "0ggr8l93xpfm4ljjxw0g6kbm0q64hviaamcb5r2vrx9nabz95n95";
sha256 = "0l70nmxvk30h56bs46cgakddzdf3laj1y88d0jchij0yy7ixa61f";
};
vendorSha256 = null;

View file

@ -11,11 +11,11 @@
mkDerivation rec {
pname = "datovka";
version = "4.15.5";
version = "4.15.6";
src = fetchurl {
url = "https://secure.nic.cz/files/datove_schranky/${version}/${pname}-${version}.tar.xz";
sha256 = "1mnw1m3wjkw8rfh6fwwrhfmkna6j19pza9cs7kyp8qj1fzzqi8my";
sha256 = "1qs1yd9qqsf56jm9w6sffkqb2l8s3i9qgi2q8vd59ss19ym6yky2";
};
buildInputs = [ libisds qmake qtbase qtsvg libxml2 ];

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, wrapPython }:
{ stdenv, lib, fetchFromGitHub, wrapPython, fetchpatch }:
with lib;
@ -13,6 +13,13 @@ stdenv.mkDerivation {
sha256 = "03i1arwyj9qpfyyvccl21lbpz3rnnp1hsadvc0b23nh1z2ng9sff";
};
patches = [
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/stackp/Droopy/pull/30.patch";
sha256 = "Y6jBraKvVQAiScbvLwezSKeWY3vaAbhaNXEGNaItigQ=";
})
];
nativeBuildInputs = [ wrapPython ];
installPhase = ''

View file

@ -17,20 +17,20 @@ in {
pname = "discord-ptb";
binaryName = "DiscordPTB";
desktopName = "Discord PTB";
version = "0.0.22";
version = "0.0.23";
src = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
sha256 = "06qyh8i9d7il6q7q7iaymbbcmdcgrj6rc4z4xik1ay3fr7qy299j";
sha256 = "0vxz68vldrbmmw1alpwl7blfcy6byd6zg9m0851dm0p0ldyhsp5j";
};
};
canary = callPackage ./base.nix rec {
pname = "discord-canary";
binaryName = "DiscordCanary";
desktopName = "Discord Canary";
version = "0.0.115";
version = "0.0.116";
src = fetchurl {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "0w9i3plbiiy2kp4yahsdvz0f4wpszsgqdnlgzbnx7wj0xk4qrkcx";
sha256 = "14kg85gz91f9mvvnl5p1lwz40rm47bca3a8dwv4618zv6vncgmkp";
};
};
}.${branch}

View file

@ -92,6 +92,7 @@ rustPlatform.buildRustPackage rec {
description = "Matrix group messaging app";
homepage = "https://gitlab.gnome.org/GNOME/fractal";
license = licenses.gpl3;
broken = stdenv.isDarwin;
maintainers = with maintainers; [ dtzWill worldofpeace ];
};
}

View file

@ -10,7 +10,7 @@
buildPythonApplication rec {
pname = "pantalaimon";
version = "0.7.0";
version = "0.8.0";
disabled = pythonOlder "3.6";
@ -19,7 +19,7 @@ buildPythonApplication rec {
owner = "matrix-org";
repo = pname;
rev = version;
sha256 = "0cx8sqajf5lh8w61yy1l6ry67rv1b45xp264zkw3s7ip80i4ylb2";
sha256 = "0n86cdpw85qzlcr1ynvar0f0zbphmdz1jia9r75lmj07iw4r5hk9";
};
propagatedBuildInputs = [

View file

@ -1,19 +1,19 @@
{ stdenv, fetchurl, autoPatchelfHook, writeScript }:
{ stdenv, fetchurl, postgresql, autoPatchelfHook, writeScript }:
let
arch = if stdenv.is64bit then "amd64" else "x86";
in stdenv.mkDerivation rec {
pname = "teamspeak-server";
version = "3.12.1";
version = "3.13.2";
src = fetchurl {
url = "https://files.teamspeak-services.com/releases/server/${version}/teamspeak3-server_linux_${arch}-${version}.tar.bz2";
sha256 = if stdenv.is64bit
then "1dxbnk12ry6arn1p38hpv5jfak55pmfmxkkl7aihn3sp1aizpgyg"
else "0nfzx7pbzd95a7v08g29l84sc0lnv9fx8vz3mrmzhs0xqn9gxdkq";
then "1l9i9667wppwxbbnf6kxamnqlbxzkz9ync4rsypfla124b6cidpz"
else "0qhd05abiycsgc16r1p6y8bfdrl6zji21xaqwdizpr0jb01z335g";
};
buildInputs = [ stdenv.cc.cc ];
buildInputs = [ stdenv.cc.cc postgresql.lib ];
nativeBuildInputs = [ autoPatchelfHook ];

View file

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "toxic";
version = "0.8.4";
version = "0.9.0";
src = fetchFromGitHub {
owner = "Tox";
repo = "toxic";
rev = "v${version}";
sha256 = "0p1cmj1kyp506y5xm04mhlznhf5wcylvgsn6b307ms91vjqs3fg2";
sha256 = "1y0k9vfb4818b3s313jlxbpjwdxd62cc4kc1vpxdjvs8mx543vrv";
};
makeFlags = [ "PREFIX=$(out)"];

View file

@ -6,14 +6,14 @@
}:
stdenv.mkDerivation rec {
version = "20201120";
version = "20201127";
pname = "neomutt";
src = fetchFromGitHub {
owner = "neomutt";
repo = "neomutt";
rev = version;
sha256 = "0z6xavgd0zv9pqvfsdyvhhi1q3y7zxhgg24isbnn9r6mldafqwna";
sha256 = "sha256-BkDGKZmpwahDw1vD67CyWfxD93H83kcpv5JBGVL5F/o=";
};
buildInputs = [

View file

@ -43,6 +43,7 @@ mkDerivation rec {
GenericName[it]=Generatore ed Analizzatore di pacchetti di rete
Comment[it]=Generatore ed Analizzatore di pacchetti di rete con interfaccia amichevole
'';
fileValidation = false;
};
postInstall = ''

View file

@ -3,12 +3,12 @@
with stdenv.lib;
stdenv.mkDerivation rec {
version = "6.8.7";
version = "6.8.8";
pname = "frostwire";
src = fetchurl {
url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.amd64.tar.gz";
sha256 = "1m9v4abm8jbyz46hin63vi6irs32n1xzg85bdyb48vpdxh6iwv04";
sha256 = "0zxk0nv7m1k4n8n82h1rkh239a58s7j643lgqbw3qx45bdy4sf4k";
};
nativeBuildInputs = [ makeWrapper ];

View file

@ -0,0 +1,66 @@
{ stdenv
, mkDerivation
, fetchFromGitHub
, qmake
, qttools
, cmake
, clang
, grpc
, protobuf
, openssl
, pkgconfig
, c-ares
, abseil-cpp
, libGL
, zlib
}:
mkDerivation rec {
pname = "qv2ray";
version = "2.6.3";
src = fetchFromGitHub {
owner = "Qv2ray";
repo = "Qv2ray";
rev = "v${version}";
sha256 = "sha256-zf3IlpRbZGDZMEny0jp7S+kWtcE1Z10U9GzKC0W0mZI=";
fetchSubmodules = true;
};
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DQV2RAY_DISABLE_AUTO_UPDATE=on"
"-DQV2RAY_TRANSLATION_PATH=${placeholder "out"}/share/qv2ray/lang"
];
preConfigure = ''
export _QV2RAY_BUILD_INFO_="Qv2ray Nixpkgs"
export _QV2RAY_BUILD_EXTRA_INFO_="(Nixpkgs build) nixpkgs"
'';
buildInputs = [
libGL
zlib
grpc
protobuf
openssl
abseil-cpp
c-ares
];
nativeBuildInputs = [
cmake
clang
pkgconfig
qmake
qttools
];
meta = with stdenv.lib; {
description = "An GUI frontend to v2ray";
homepage = "https://qv2ray.github.io/en/";
license = licenses.gpl3;
maintainers = with maintainers; [ poscat ];
platforms = platforms.all;
};
}

View file

@ -58,6 +58,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
broken = true;
description = "A cross-platform SSH client with cloud data sync and more";
homepage = "https://termius.com/";
downloadPage = "https://termius.com/linux/";

View file

@ -7,7 +7,6 @@ stdenv.mkDerivation rec {
src = fetchzip {
url = "https://bobswift.atlassian.net/wiki/download/attachments/16285777/${pname}-${version}-distribution.zip";
sha256 = "091dhjkx7fdn23cj7c4071swncsbmknpvidmmjzhc0355l3p4k2g";
extraPostFetch = "chmod go-w $out";
};
tools = [

View file

@ -9,13 +9,13 @@ assert pulseaudioSupport -> libpulseaudio != null;
mkDerivation rec {
pname = "gqrx";
version = "2.13.5";
version = "2.14";
src = fetchFromGitHub {
owner = "csete";
repo = "gqrx";
rev = "v${version}";
sha256 = "168wjad5g0ka555hwsciwbj7fqx1c89q59hq1yxj8aiyp5kfcahx";
sha256 = "1iz4lgk99v5bwzk35wi4jg8nn3gbp0vm1p6svs42mxxxf9f99j7i";
};
nativeBuildInputs = [ cmake ];

View file

@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
pname = "igv";
version = "2.8.12";
version = "2.8.13";
src = fetchzip {
url = "https://data.broadinstitute.org/igv/projects/downloads/2.8/IGV_${version}.zip";
sha256 = "0zxmk417j9s5nms0np1fsip7r0jhwkj1d1x424ljr9krcb2zwcyq";
sha256 = "0sab478jq96iw3fv0560hrrj8qbh40r8m4ncypdb7991j9haxl09";
};
installPhase = ''

View file

@ -17,14 +17,14 @@ let
};
in
stdenv.mkDerivation rec {
version = "14.31.17";
version = "14.31.18";
pname = "jmol";
src = let
baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
in fetchurl {
url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
sha256 = "1cg3a56bbvlq5wfjgwclg9vsj61kmj6fnqvgf7fdvklhdvnijla2";
sha256 = "0hkc7c08azbw3k91ygwz6r5y4yw6k8l7h4gcq5p71knd5k1fa5jd";
};
patchPhase = ''

View file

@ -1,42 +1,46 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake,
libzip, boost, fftw, qtbase,
libusb1, wrapQtAppsHook, libsigrok4dsl, libsigrokdecode4dsl
{ lib, mkDerivation, fetchFromGitHub, pkgconfig, cmake
, libzip, boost, fftw, qtbase, libusb1, libsigrok4dsl
, libsigrokdecode4dsl, python3, fetchpatch
}:
stdenv.mkDerivation rec {
mkDerivation rec {
pname = "dsview";
version = "0.99";
version = "1.12";
src = fetchFromGitHub {
owner = "DreamSourceLab";
repo = "DSView";
rev = version;
sha256 = "189i3baqgn8k3aypalayss0g489xi0an9hmvyggvxmgg1cvcwka2";
rev = "v${version}";
sha256 = "q7F4FuK/moKkouXTNPZDVon/W/ZmgtNHJka4MiTxA0U=";
};
postUnpack = ''
export sourceRoot=$sourceRoot/DSView
'';
sourceRoot = "source/DSView";
patches = [
# Fix absolute install paths
./install.patch
# Fix buld with Qt5.15 already merged upstream for future release
# Using local file instead of content of commit #33e3d896a47 because
# sourceRoot make it unappliable
./qt515.patch
];
nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
boost fftw qtbase libusb1 libzip libsigrokdecode4dsl libsigrok4dsl
boost fftw qtbase libusb1 libzip libsigrokdecode4dsl libsigrok4dsl
python3
];
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
homepage = "https://www.dreamsourcelab.com/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bachp ];
maintainers = with maintainers; [ bachp ];
};
}

View file

@ -2,10 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index c1c33e1..208a184 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -403,8 +403,8 @@ install(DIRECTORY res DESTINATION share/${PROJECT_NAME})
install(FILES icons/logo.png DESTINATION share/${PROJECT_NAME} RENAME logo.png)
install(FILES ../NEWS DESTINATION share/${PROJECT_NAME} RENAME NEWS)
install(FILES ../ug.pdf DESTINATION share/${PROJECT_NAME} RENAME ug.pdf)
@@ -427,8 +427,8 @@
install(FILES ../NEWS31 DESTINATION share/${PROJECT_NAME} RENAME NEWS31)
install(FILES ../ug25.pdf DESTINATION share/${PROJECT_NAME} RENAME ug25.pdf)
install(FILES ../ug31.pdf DESTINATION share/${PROJECT_NAME} RENAME ug31.pdf)
-install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/)
-install(FILES DSView.desktop DESTINATION /usr/share/applications/)
+install(FILES DreamSourceLab.rules DESTINATION etc/udev/rules.d/)

View file

@ -0,0 +1,13 @@
diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp
index 921d3db..16cdce9 100755
--- a/pv/view/viewport.cpp
+++ b/pv/view/viewport.cpp
@@ -37,7 +37,7 @@
#include <QMouseEvent>
#include <QStyleOption>
-
+#include <QPainterPath>
#include <math.h>

View file

@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
description = "A high-performance theorem prover and SMT solver";
homepage = "https://github.com/Z3Prover/z3";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.x86_64;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ttuegel ];
};
}

View file

@ -0,0 +1,43 @@
{ stdenv, fetchurl, curl, fftw, gmp, gnuplot, gtk3, gtksourceview3, json-glib
, lapack, libxml2, mpfr, openblas, pkg-config, readline }:
stdenv.mkDerivation rec {
pname = "gretl";
version = "2020b";
src = fetchurl {
url = "mirror://sourceforge/gretl/${pname}-${version}.tar.xz";
sha256 = "0mpb8gc0mcfql8lzwknpkf1sg7mj9ikzd8r1x5xniabd9mmdhplm";
};
buildInputs = [
curl
fftw
gmp
gnuplot
gtk3
gtksourceview3
json-glib
lapack
libxml2
mpfr
openblas
readline
];
nativeBuildInputs = [ pkg-config ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "A software package for econometric analysis";
longDescription = ''
gretl is a cross-platform software package for econometric analysis,
written in the C programming language.
'';
homepage = "http://gretl.sourceforge.net";
license = licenses.gpl3;
maintainers = with maintainers; [ dmrauh ];
platforms = with platforms; all;
};
}

View file

@ -61,6 +61,7 @@ stdenv.mkDerivation rec {
};
meta = with stdenv.lib; {
broken = true;
description = "Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab";
license = licenses.gpl2;
maintainers = teams.sage.members;

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "bcompare";
version = "4.3.5.24893";
version = "4.3.7.25118";
src = fetchurl {
url = "https://www.scootersoftware.com/${pname}-${version}_amd64.deb";
sha256 = "1gm8d6hgdg8f3hd83wqac28gkvz5nyn62wj7x44vmr60dh4i2jfn";
sha256 = "165d6d81vy29pr62y4rcvl4abqqhfwdzcsx77p0dqlzgqswj88v8";
};
unpackPhase = ''

View file

@ -203,6 +203,8 @@ let
inherit (darwin.apple_sdk.frameworks) Security AppKit;
};
glab = callPackage ./glab { };
grv = callPackage ./grv { };
hub = callPackage ./hub { };

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "gitstatus";
version = "1.3.1";
version = "1.4.3";
src = fetchFromGitHub {
owner = "romkatv";
repo = "gitstatus";
rev = "v${version}";
sha256 = "03zaywncds7pjrl07rvdf3fh39gnp2zfvgsf0afqwv317sgmgpzf";
sha256 = "0skpi22plzb9r9cgqfnjzpaz856q9f4n0gd5i97nv8bfny8hl30z";
};
buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];

View file

@ -0,0 +1,28 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "glab";
version = "1.11.1";
src = fetchFromGitHub {
owner = "profclems";
repo = pname;
rev = "v${version}";
sha256 = "mmrTuldU2WDe9t2nC3DYfqwb28uh6qjAaaveR221mjw=";
};
vendorSha256 = "B4RKcKUTdGkonsKhL7NIKzVpZq6XD6cMMWed4wr/Moc=";
runVend = true;
# Tests are trying to access /homeless-shelter
doCheck = false;
subPackages = [ "cmd/glab" ];
meta = with lib; {
description = "An open-source GitLab command line tool";
license = licenses.mit;
homepage = "https://glab.readthedocs.io/";
maintainers = with maintainers; [ freezeboy ];
};
}

View file

@ -481,12 +481,12 @@ let self = rec {
plugin = "inputstream-adaptive";
namespace = "inputstream.adaptive";
version = "2.3.12";
version = "2.4.6";
src = fetchFromGitHub {
owner = "peak3d";
repo = "inputstream.adaptive";
rev = version;
rev = "${version}-${rel}";
sha256 = "09d9b35mpaf3g5m51viyan9hv7d2i8ndvb9wm0j7rs5gwsf0k71z";
};

View file

@ -0,0 +1,36 @@
diff -Naur xen-4.10.4-orig/xen/arch/x86/Makefile xen-4.10.4-patched/xen/arch/x86/Makefile
--- xen-4.10.4-orig/xen/arch/x86/Makefile 2019-07-04 01:28:50.000000000 +1000
+++ xen-4.10.4-patched/xen/arch/x86/Makefile 2020-03-03 13:32:34.607951507 +1100
@@ -166,7 +166,7 @@
# Check if the compiler supports the MS ABI.
export XEN_BUILD_EFI := $(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CFLAGS)) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
# Check if the linker supports PE.
-XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(EFI_LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y))
CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
$(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p')
@@ -188,20 +188,20 @@
$(TARGET).efi: prelink-efi.o $(note_file) efi.lds efi/relocs-dummy.o $(BASEDIR)/common/symbols-dummy.o efi/mkreloc
$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
- $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi/relocs-dummy.o \
+ $(guard) $(EFI_LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi/relocs-dummy.o \
$(BASEDIR)/common/symbols-dummy.o $(note_file) -o $(@D)/.$(@F).$(base).0 &&) :
$(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0) >$(@D)/.$(@F).0r.S
$(guard) $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).0 \
| $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s.S
$(guard) $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o
$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
- $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \
+ $(guard) $(EFI_LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \
$(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file) -o $(@D)/.$(@F).$(base).1 &&) :
$(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1) >$(@D)/.$(@F).1r.S
$(guard) $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).1 \
| $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s.S
$(guard) $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o
- $(guard) $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \
+ $(guard) $(EFI_LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \
$(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file) -o $@
if $(guard) false; then rm -f $@; echo 'EFI support disabled'; \
else $(NM) -pa --format=sysv $(@D)/$(@F) \

View file

@ -0,0 +1,35 @@
EFI_MOUNTPOINT is conventionally /boot/efi or /boot/EFI or something
like that, and (on my machine) has directories within that called
{Boot, nixos, gummiboot}.
This patch does two things:
1) Xen apparently wants to put files in
$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR) - we remove the duplicate 'efi' name
because I can't see why we have it
2) Ensures the said directory exists
--- a/xen/Makefile 2016-01-08 01:50:58.028045657 +0000
+++ b/xen/Makefile 2016-01-08 01:51:33.560268718 +0000
@@ -49,7 +49,9 @@
ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \
ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \
if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
- $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \
+ [ -d $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR) ] || \
+ $(INSTALL_DIR) $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR) ;\
+ $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \
elif [ "$(D)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(D))" ]; then \
echo 'EFI installation only partially done (EFI_VENDOR not set)' >&2; \
fi; \
@@ -69,7 +69,7 @@
rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi
rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi
rm -f $(D)$(EFI_DIR)/$(T).efi
- rm -f $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi
+ rm -f $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi
.PHONY: _debug
_debug:

View file

@ -1,198 +0,0 @@
{ stdenv, callPackage, fetchurl, fetchpatch, fetchgit
, ocaml-ng
, withInternalQemu ? true
, withInternalTraditionalQemu ? true
, withInternalSeabios ? true
, withSeabios ? !withInternalSeabios, seabios ? null
, withInternalOVMF ? false # FIXME: tricky to build
, withOVMF ? false, OVMF
, withLibHVM ? true
# qemu
, udev, pciutils, xorg, SDL, pixman, acl, glusterfs, spice-protocol, usbredir
, alsaLib
, ... } @ args:
assert withInternalSeabios -> !withSeabios;
assert withInternalOVMF -> !withOVMF;
with stdenv.lib;
# Patching XEN? Check the XSAs at
# https://xenbits.xen.org/xsa/
# and try applying all the ones we don't have yet.
let
xsa = import ./xsa-patches.nix { inherit fetchpatch; };
xenlockprofpatch = (fetchpatch {
name = "xenlockprof-gcc7.patch";
url = "https://xenbits.xen.org/gitweb/?p=xen.git;a=patch;h=f49fa658b53580cf2ad354d2bf1796766cc11222";
sha256 = "1lvzfvkqirknivm8q4cg5byfqz49s16zjk65fkwl3kwb03chky70";
});
xenpmdpatch = (fetchpatch {
name = "xenpmd-gcc7.patch";
url = "https://xenbits.xen.org/gitweb/?p=xen.git;a=patch;h=2d78f78a14528752266982473c07118f1bc336e3";
sha256 = "1ki295pymbcfc64sjb9wqfwpv19p8vwgmnxankada3vm4fxg2rhq";
});
qemuMemfdBuildFix = fetchpatch {
name = "xen-4.8-memfd-build-fix.patch";
url = "https://github.com/qemu/qemu/commit/75e5b70e6b5dcc4f2219992d7cffa462aa406af0.patch";
sha256 = "0gaz93kb33qc0jx6iphvny0yrd17i8zhcl3a9ky5ylc2idz0wiwa";
};
# Ported from
#"https://xenbits.xen.org/gitweb/?p=qemu-xen.git;a=patch;h=e014dbe74e0484188164c61ff6843f8a04a8cb9d";
#"https://xenbits.xen.org/gitweb/?p=qemu-xen.git;a=patch;h=0e3b891fefacc0e49f3c8ffa3a753b69eb7214d2";
qemuGlusterfs6Fix = ./qemu-gluster-6-compat.diff;
qemuDeps = [
udev pciutils xorg.libX11 SDL pixman acl glusterfs spice-protocol usbredir
alsaLib
];
in
callPackage (import ./generic.nix (rec {
version = "4.8.5";
src = fetchurl {
url = "https://downloads.xenproject.org/release/xen/${version}/xen-${version}.tar.gz";
sha256 = "04xcf01jad1lpqnmjblzhnjzp0bss9fjd9awgcycjx679arbaxqz";
};
# Sources needed to build tools and firmwares.
xenfiles = optionalAttrs withInternalQemu {
qemu-xen = {
src = fetchgit {
url = "https://xenbits.xen.org/git-http/qemu-xen.git";
rev = "refs/tags/qemu-xen-${version}";
sha256 = "0lb7zd5nvr6znx47z93nbq4gj8xfb3622s8r2cvmpqmwnmlc3nd4";
};
patches = [
qemuMemfdBuildFix
qemuGlusterfs6Fix
];
buildInputs = qemuDeps;
meta.description = "Xen's fork of upstream Qemu";
};
} // optionalAttrs withInternalTraditionalQemu {
qemu-xen-traditional = {
src = fetchgit {
url = "https://xenbits.xen.org/git-http/qemu-xen-traditional.git";
rev = "refs/tags/xen-${version}";
sha256 = "0mryap5y53r09m7qc0b821f717ghwm654r8c3ik1w7adzxr0l5qk";
};
buildInputs = qemuDeps;
patches = [
];
postPatch = ''
substituteInPlace xen-hooks.mak \
--replace /usr/include/pci ${pciutils}/include/pci
'';
meta.description = "Xen's fork of upstream Qemu that uses old device model";
};
} // optionalAttrs withInternalSeabios {
"firmware/seabios-dir-remote" = {
src = fetchgit {
url = "https://xenbits.xen.org/git-http/seabios.git";
rev = "f0cdc36d2f2424f6b40438f7ee7cc502c0eff4df";
sha256 = "1wq5pjkjrfzqnq3wyr15mcn1l4c563m65gdyf8jm97kgb13pwwfm";
};
patches = [ ./0000-qemu-seabios-enable-ATA_DMA.patch ];
meta.description = "Xen's fork of Seabios";
};
} // optionalAttrs withInternalOVMF {
"firmware/ovmf-dir-remote" = {
src = fetchgit {
url = "https://xenbits.xen.org/git-http/ovmf.git";
rev = "173bf5c847e3ca8b42c11796ce048d8e2e916ff8";
sha256 = "07zmdj90zjrzip74fvd4ss8n8njk6cim85s58mc6snxmqqv7gmcr";
};
meta.description = "Xen's fork of OVMF";
};
} // {
# TODO: patch Xen to make this optional?
"firmware/etherboot/ipxe.git" = {
src = fetchgit {
url = "https://git.ipxe.org/ipxe.git";
rev = "356f6c1b64d7a97746d1816cef8ca22bdd8d0b5d";
sha256 = "15n400vm3id5r8y3k6lrp9ab2911a9vh9856f5gvphkazfnmns09";
};
meta.description = "Xen's fork of iPXE";
};
} // optionalAttrs withLibHVM {
xen-libhvm-dir-remote = {
src = fetchgit {
name = "xen-libhvm";
url = "https://github.com/michalpalka/xen-libhvm";
rev = "83065d36b36d6d527c2a4e0f5aaf0a09ee83122c";
sha256 = "1jzv479wvgjkazprqdzcdjy199azmx2xl3pnxli39kc5mvjz3lzd";
};
buildPhase = ''
make
cd biospt
cc -Wall -g -D_LINUX -Wstrict-prototypes biospt.c -o biospt -I../libhvm -L../libhvm -lxenhvm
'';
installPhase = ''
make install
cp biospt/biospt $out/bin/
'';
meta = {
description = ''
Helper library for reading ACPI and SMBIOS firmware values
from the host system for use with the HVM guest firmware
pass-through feature in Xen'';
license = licenses.bsd2;
};
};
};
configureFlags = []
++ optional (!withInternalQemu) "--with-system-qemu" # use qemu from PATH
++ optional (withInternalTraditionalQemu) "--enable-qemu-traditional"
++ optional (!withInternalTraditionalQemu) "--disable-qemu-traditional"
++ optional (withSeabios) "--with-system-seabios=${seabios}"
++ optional (!withInternalSeabios && !withSeabios) "--disable-seabios"
++ optional (withOVMF) "--with-system-ovmf=${OVMF.fd}/FV/OVMF.fd"
++ optional (withInternalOVMF) "--enable-ovmf";
patches = with xsa; flatten [
# 253: 4.8 not affected
# 254: no patch supplied by xen project (Meltdown/Spectre)
xenlockprofpatch
xenpmdpatch
];
NIX_CFLAGS_COMPILE = toString [
# Fix build on Glibc 2.24
"-Wno-error=deprecated-declarations"
# Fix build with GCC8
"-Wno-error=maybe-uninitialized"
"-Wno-error=stringop-truncation"
"-Wno-error=format-truncation"
"-Wno-error=array-bounds"
# Fix build with GCC9
"-Wno-error=address-of-packed-member"
"-Wno-error=format-overflow"
"-Wno-error=absolute-value"
];
postPatch = ''
# Avoid a glibc >= 2.25 deprecation warnings that get fatal via -Werror.
sed 1i'#include <sys/sysmacros.h>' \
-i tools/blktap2/control/tap-ctl-allocate.c \
-i tools/libxl/libxl_device.c \
${optionalString withInternalQemu "-i tools/qemu-xen/hw/9pfs/9p.c"}
sed -i -e '/sys\/sysctl\.h/d' tools/blktap2/drivers/block-remus.c
'';
passthru.qemu-system-i386 = if withInternalQemu
then "lib/xen/bin/qemu-system-i386"
else throw "this xen has no qemu builtin";
})) ({ ocamlPackages = ocaml-ng.ocamlPackages_4_05; } // args)

View file

@ -20,6 +20,8 @@ config:
# python2Packages.markdown
, transfig, ghostscript, texinfo, pandoc
, binutils-unwrapped
, ...} @ args:
with stdenv.lib;
@ -42,6 +44,17 @@ let
}
( __do )
'');
# We don't want to use the wrapped version, because this version of ld is
# only used for linking the Xen EFI binary, and the build process really
# needs control over the LDFLAGS used
efiBinutils = binutils-unwrapped.overrideAttrs (oldAttrs: {
name = "efi-binutils";
configureFlags = oldAttrs.configureFlags ++ [
"--enable-targets=x86_64-pep"
];
doInstallCheck = false; # We get a spurious failure otherwise, due to host/target mis-match
});
in
stdenv.mkDerivation (rec {
@ -119,10 +132,12 @@ stdenv.mkDerivation (rec {
'')}
'';
patches = [ ./0000-fix-ipxe-src.patch
./0000-fix-install-python.patch
] ++ optional (versionOlder version "4.8.5") ./acpica-utils-20180427.patch
++ (config.patches or []);
patches = [
./0000-fix-ipxe-src.patch
./0000-fix-install-python.patch
./0004-makefile-use-efi-ld.patch
./0005-makefile-fix-efi-mountdir-use.patch
] ++ (config.patches or []);
postPatch = ''
### Hacks
@ -186,6 +201,9 @@ stdenv.mkDerivation (rec {
--replace /bin/ls ls
'';
EFI_LD = "${efiBinutils}/bin/ld";
EFI_VENDOR = "nixos";
# TODO: Flask needs more testing before enabling it by default.
#makeFlags = [ "XSM_ENABLE=y" "FLASK_ENABLE=y" "PREFIX=$(out)" "CONFIG_DIR=/etc" "XEN_EXTFILES_URL=\\$(XEN_ROOT)/xen_ext_files" ];
makeFlags = [ "PREFIX=$(out) CONFIG_DIR=/etc" "XEN_SCRIPT_DIR=/etc/xen/scripts" ]

View file

@ -1,57 +1,11 @@
{ callPackage
, stdenv, overrideCC
, stdenv
}:
# TODO(@oxij) on new Xen version: generalize this to generate [vanilla slim
# light] for each ./<version>.nix.
rec {
xen_4_8-vanilla = callPackage ./4.8.nix {
meta = {
description = "vanilla";
longDescription = ''
Vanilla version of Xen. Uses forks of Qemu and Seabios bundled
with Xen. This gives vanilla experince, but wastes space and
build time: typical NixOS setup that runs lots of VMs will
build three different versions of Qemu when using this (two
forks and upstream).
'';
};
};
xen_4_8-slim = xen_4_8-vanilla.override {
withInternalQemu = false;
withInternalTraditionalQemu = true;
withInternalSeabios = false;
withSeabios = true;
meta = {
description = "slim";
longDescription = ''
Slimmed-down version of Xen that reuses nixpkgs packages as
much as possible. Different parts may get out of sync, but
this builds faster and uses less space than vanilla. Use with
`qemu_xen` from nixpkgs.
'';
};
};
xen_4_8-light = xen_4_8-vanilla.override {
withInternalQemu = false;
withInternalTraditionalQemu = false;
withInternalSeabios = false;
withSeabios = true;
meta = {
description = "light";
longDescription = ''
Slimmed-down version of Xen without `qemu-traditional` (you
don't need it if you don't know what it is). Use with
`qemu_xen-light` from nixpkgs.
'';
};
};
xen_4_10-vanilla = callPackage ./4.10.nix {
meta = {
description = "vanilla";
@ -98,8 +52,8 @@ rec {
};
};
xen-vanilla = xen_4_8-vanilla;
xen-slim = xen_4_8-slim;
xen-light = xen_4_8-light;
xen-vanilla = xen_4_10-vanilla;
xen-slim = xen_4_10-slim;
xen-light = xen_4_10-light;
}

View file

@ -1,11 +1,11 @@
{ stdenv, fetchurl, perl, libxcb }:
stdenv.mkDerivation {
name = "lemonbar-1.3";
name = "lemonbar-1.4";
src = fetchurl {
url = "https://github.com/LemonBoy/bar/archive/v1.3.tar.gz";
sha256 = "0zd3v8ys4jzi60pm3wq7p3pbbd5y0acimgiq46qx1ckmwg2q9rza";
url = "https://github.com/LemonBoy/bar/archive/v1.4.tar.gz";
sha256 = "0fa91vb968zh6fyg97kdaix7irvqjqhpsb6ks0ggcl59lkbkdzbv";
};
buildInputs = [ libxcb perl ];

View file

@ -44,8 +44,13 @@
mv "$unpackDir/$fn" "$out"
'' else ''
mv "$unpackDir" "$out"
'') #*/
+ extraPostFetch;
'')
+ extraPostFetch
# Remove write permissions for files unpacked with write bits set
# Fixes https://github.com/NixOS/nixpkgs/issues/38649
+ ''
chmod -R a-w "$out"
'';
} // removeAttrs args [ "stripRoot" "extraPostFetch" ])).overrideAttrs (x: {
# Hackety-hack: we actually need unzip hooks, too
nativeBuildInputs = x.nativeBuildInputs ++ [ unzip ];

View file

@ -15,7 +15,7 @@
++ [(mkRustcDepArgs dependencies crateRenames)]
++ [(mkRustcFeatureArgs crateFeatures)]
++ extraRustcOpts
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--target ${rust.toRustTarget stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc"
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--target ${rust.toRustTargetSpec stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc"
# since rustc 1.42 the "proc_macro" crate is part of the default crate prelude
# https://github.com/rust-lang/cargo/commit/4d64eb99a4#diff-7f98585dbf9d30aa100c8318e2c77e79R1021-R1022
++ lib.optional (lib.elem "proc-macro" crateType) "--extern proc_macro"

View file

@ -135,8 +135,8 @@ in ''
export CARGO_MANIFEST_DIR=$(pwd)
export DEBUG="${toString (!release)}"
export OPT_LEVEL="${toString optLevel}"
export TARGET="${rust.toRustTarget stdenv.hostPlatform}"
export HOST="${rust.toRustTarget stdenv.buildPlatform}"
export TARGET="${rust.toRustTargetSpec stdenv.hostPlatform}"
export HOST="${rust.toRustTargetSpec stdenv.buildPlatform}"
export PROFILE=${if release then "release" else "debug"}
export OUT_DIR=$(pwd)/target/build/${crateName}.out
export CARGO_PKG_VERSION_MAJOR=${lib.elemAt version 0}

View file

@ -4,6 +4,10 @@
, cargo
, diffutils
, fetchCargoTarball
, runCommandNoCC
, rustPlatform
, callPackage
, remarshal
, git
, rust
, rustc
@ -26,12 +30,15 @@
, cargoBuildFlags ? []
, buildType ? "release"
, meta ? {}
, target ? null
, target ? rust.toRustTargetSpec stdenv.hostPlatform
, cargoVendorDir ? null
, checkType ? buildType
, depsExtraArgs ? {}
, cargoParallelTestThreads ? true
# Toggles whether a custom sysroot is created when the target is a .json file.
, __internal_dontAddSysroot ? false
# Needed to `pushd`/`popd` into a subdir of a tarball if this subdir
# contains a Cargo.toml, but isn't part of a workspace (which is e.g. the
# case for `rustfmt`/etc from the `rust-sources).
@ -69,13 +76,26 @@ let
cargoDepsCopy="$sourceRoot/${cargoVendorDir}"
'';
rustTarget = if target == null then rust.toRustTarget stdenv.hostPlatform else target;
targetIsJSON = stdenv.lib.hasSuffix ".json" target;
useSysroot = targetIsJSON && !__internal_dontAddSysroot;
# see https://github.com/rust-lang/cargo/blob/964a16a28e234a3d397b2a7031d4ab4a428b1391/src/cargo/core/compiler/compile_kind.rs#L151-L168
# the "${}" is needed to transform the path into a /nix/store path before baseNameOf
shortTarget = if targetIsJSON then
(stdenv.lib.removeSuffix ".json" (builtins.baseNameOf "${target}"))
else target;
sysroot = (callPackage ./sysroot {}) {
inherit target shortTarget;
RUSTFLAGS = args.RUSTFLAGS or "";
originalCargoToml = src + /Cargo.toml; # profile info is later extracted
};
ccForBuild="${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc";
cxxForBuild="${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++";
ccForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
cxxForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
releaseDir = "target/${rustTarget}/${buildType}";
releaseDir = "target/${shortTarget}/${buildType}";
tmpDir = "${releaseDir}-tmp";
# Specify the stdenv's `diff` by abspath to ensure that the user's build
@ -85,7 +105,13 @@ let
in
stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // {
# Tests don't currently work for `no_std`, and all custom sysroots are currently built without `std`.
# See https://os.phil-opp.com/testing/ for more information.
assert useSysroot -> !(args.doCheck or true);
stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // stdenv.lib.optionalAttrs useSysroot {
RUSTFLAGS = "--sysroot ${sysroot} " + (args.RUSTFLAGS or "");
} // {
inherit cargoDeps;
patchRegistryDeps = ./patch-registry-deps;
@ -115,7 +141,7 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // {
[target."${rust.toRustTarget stdenv.buildPlatform}"]
"linker" = "${ccForBuild}"
${stdenv.lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
[target."${rustTarget}"]
[target."${shortTarget}"]
"linker" = "${ccForHost}"
${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633
stdenv.lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) ''
@ -185,7 +211,7 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // {
"CXX_${rust.toRustTarget stdenv.hostPlatform}"="${cxxForHost}" \
cargo build -j $NIX_BUILD_CORES \
${stdenv.lib.optionalString (buildType == "release") "--release"} \
--target ${rustTarget} \
--target ${target} \
--frozen ${concatStringsSep " " cargoBuildFlags}
)
@ -205,7 +231,7 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // {
'';
checkPhase = args.checkPhase or (let
argstr = "${stdenv.lib.optionalString (checkType == "release") "--release"} --target ${rustTarget} --frozen";
argstr = "${stdenv.lib.optionalString (checkType == "release") "--release"} --target ${target} --frozen";
threads = if cargoParallelTestThreads then "$NIX_BUILD_CORES" else "1";
in ''
${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}

View file

@ -0,0 +1,29 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "alloc"
version = "0.0.0"
dependencies = [
"compiler_builtins",
"core",
]
[[package]]
name = "compiler_builtins"
version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cd0782e0a7da7598164153173e5a5d4d9b1da094473c98dce0ff91406112369"
dependencies = [
"rustc-std-workspace-core",
]
[[package]]
name = "core"
version = "0.0.0"
[[package]]
name = "rustc-std-workspace-core"
version = "1.99.0"
dependencies = [
"core",
]

View file

@ -0,0 +1,45 @@
import os
import toml
rust_src = os.environ['RUSTC_SRC']
orig_cargo = os.environ['ORIG_CARGO'] if 'ORIG_CARGO' in os.environ else None
base = {
'package': {
'name': 'alloc',
'version': '0.0.0',
'authors': ['The Rust Project Developers'],
'edition': '2018',
},
'dependencies': {
'compiler_builtins': {
'version': '0.1.0',
'features': ['rustc-dep-of-std', 'mem'],
},
'core': {
'path': os.path.join(rust_src, 'libcore'),
},
},
'lib': {
'name': 'alloc',
'path': os.path.join(rust_src, 'liballoc/lib.rs'),
},
'patch': {
'crates-io': {
'rustc-std-workspace-core': {
'path': os.path.join(rust_src, 'tools/rustc-std-workspace-core'),
},
},
},
}
if orig_cargo is not None:
with open(orig_cargo, 'r') as f:
src = toml.loads(f.read())
if 'profile' in src:
base['profile'] = src['profile']
out = toml.dumps(base)
with open('Cargo.toml', 'x') as f:
f.write(out)

View file

@ -0,0 +1,41 @@
{ stdenv, rust, rustPlatform, buildPackages }:
{ shortTarget, originalCargoToml, target, RUSTFLAGS }:
let
cargoSrc = stdenv.mkDerivation {
name = "cargo-src";
preferLocalBuild = true;
phases = [ "installPhase" ];
installPhase = ''
RUSTC_SRC=${rustPlatform.rustcSrc.override { minimalContent = false; }} ORIG_CARGO=${originalCargoToml} \
${buildPackages.python3.withPackages (ps: with ps; [ toml ])}/bin/python3 ${./cargo.py}
mkdir -p $out
cp Cargo.toml $out/Cargo.toml
cp ${./Cargo.lock} $out/Cargo.lock
'';
};
in rustPlatform.buildRustPackage {
inherit target RUSTFLAGS;
name = "custom-sysroot";
src = cargoSrc;
RUSTC_BOOTSTRAP = 1;
__internal_dontAddSysroot = true;
cargoSha256 = "0y6dqfhsgk00y3fv5bnjzk0s7i30nwqc1rp0xlrk83hkh80x81mw";
doCheck = false;
installPhase = ''
export LIBS_DIR=$out/lib/rustlib/${shortTarget}/lib
mkdir -p $LIBS_DIR
for f in target/${shortTarget}/release/deps/*.{rlib,rmeta}; do
cp $f $LIBS_DIR
done
export RUST_SYSROOT=$(rustc --print=sysroot)
host=${rust.toRustTarget stdenv.buildPlatform}
cp -r $RUST_SYSROOT/lib/rustlib/$host $out
'';
}

View file

@ -0,0 +1,21 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p python3 python3.pkgs.toml cargo
set -e
HERE=$(dirname "${BASH_SOURCE[0]}")
NIXPKGS_ROOT="$HERE/../../../.."
# https://unix.stackexchange.com/a/84980/390173
tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'update-lockfile')
cd "$tempdir"
nix-build -E "with import (/. + \"${NIXPKGS_ROOT}\") {}; pkgs.rustPlatform.rustcSrc.override { minimalContent = false; }"
RUSTC_SRC="$(pwd)/result" python3 "$HERE/cargo.py"
RUSTC_BOOTSTRAP=1 cargo build || echo "Build failure is expected. All that's needed is the lockfile."
cp Cargo.lock "$HERE"
rm -rf "$tempdir"

View file

@ -2,7 +2,7 @@
let
pname = "agave";
version = "30";
version = "35";
in fetchurl {
name = "${pname}-${version}";
url = "https://github.com/agarick/agave/releases/download/v${version}/Agave-Regular.ttf";
@ -13,7 +13,7 @@ in fetchurl {
install -D $downloadedFile $out/share/fonts/truetype/Agave-Regular.ttf
'';
sha256 = "1f2f1fycwi8xbf8x03yfq78nv11b2msl4ll9flw8rkg023h9vwg7";
sha256 = "10shwsl1illdafnc352j439lklrxksip1vlh4jc934cr9qf4c1fz";
meta = with lib; {
description = "truetype monospaced typeface designed for X environments";

View file

@ -1,7 +1,7 @@
{ lib, fetchzip }:
let
version = "3.11";
version = "3.15";
in fetchzip {
name = "inter-${version}";
@ -12,7 +12,7 @@ in fetchzip {
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
'';
sha256 = "1bk4q478jy84ylgm1mmh23n8cw1cd3k7gvfih77sd7ya1zv26vl1";
sha256 = "0dnxczy2avc47wq5fc3psd1zbxbsjz5w24rkh5ynrfgw6n0753n0";
meta = with lib; {
homepage = "https://rsms.me/inter/";

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "theme-jade1";
version = "1.9";
version = "1.10";
src = fetchurl {
url = "https://github.com/madmaxms/theme-jade-1/releases/download/v${version}/jade-1-theme.tar.xz";
sha256 = "11fzd44ysy76iwyiwkshpf0vf6m3i3hcxyyihl0lg68nb3cv0g9y";
sha256 = "17s4r8yjhnz9wrnrma6m8qjp02r47xkjk062sdb8s91dxhh7l8q2";
};
sourceRoot = ".";

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "evisum";
version = "0.5.7";
version = "0.5.8";
src = fetchurl {
url = "https://download.enlightenment.org/rel/apps/${pname}/${pname}-${version}.tar.xz";
sha256 = "0pm63n3rls8vkjv3awq0f3zlqk33ddql3g0rl2bc46n48g2mcmbd";
sha256 = "0cg4vqd069h89k3wrvl550p29y3yzbdnvii58gwc8rghwym621jx";
};
nativeBuildInputs = [

View file

@ -43,11 +43,11 @@
stdenv.mkDerivation rec {
pname = "evolution";
version = "3.38.1";
version = "3.38.2";
src = fetchurl {
url = "mirror://gnome/sources/evolution/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1z68vhbqnm34axx4zcrds45nz2ppwzr4z1lczxrdiq0zf0cmxyfh";
sha256 = "1whjgfhcxpb5yhhvyqb8pv71vprw6fv02czin4k4z6dxrxsq32qx";
};
nativeBuildInputs = [

View file

@ -29,11 +29,11 @@
stdenv.mkDerivation rec {
pname = "gnome-maps";
version = "3.38.1.1";
version = "3.38.2";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1y59afvfrylkikqd0ax0nj41zs6b54219l7k5bp5gzh9lxq06xgk";
sha256 = "0pa6h3md688752l7cjggncnxv13c07nj584gbz9asdblljk3r9x1";
};
doCheck = true;

View file

@ -38,11 +38,11 @@
stdenv.mkDerivation rec {
pname = "gnome-initial-setup";
version = "3.38.1";
version = "3.38.2";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
hash = "sha256-5V1PQHOZjg+3s9/MRw4qTH2VCpa+2rFQEbkITryBNnY=";
hash = "sha256-qliJJ0+LC23moFErR3Qrgqw0ANrsgt1O/+LuonRko7g=";
};
nativeBuildInputs = [

View file

@ -32,11 +32,11 @@
stdenv.mkDerivation rec {
pname = "nautilus";
version = "3.38.1";
version = "3.38.2";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1zfh48ibap6jnw20rxls7nbv4zzqs6n5abr2dzyvfx5p2cmq2gha";
sha256 = "19ln84d6s05h6cvx3c500bg5pvkz4k6p6ykmr2201rblq9afp76h";
};
patches = [

View file

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "gnome-tetravex";
version = "3.38.1";
version = "3.38.2";
src = fetchurl {
url = "mirror://gnome/sources/gnome-tetravex/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0s70swm2acgydz77nxyzn9xv8p03la7sl3cq87s7b8g7lyw943mv";
sha256 = "06wihvqp2p52zd2dnknsc3rii69qib4a30yp15h558xrg44z3k8z";
};
passthru = {

View file

@ -0,0 +1,34 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper }:
stdenv.mkDerivation rec {
pname = "muon";
version = "2019-11-27";
src = fetchFromGitHub {
owner = "nickmqb";
repo = pname;
rev = "6d3a5054ae75b0e5a0ae633cf8cbc3e2a054f8b3";
sha256 = "1sb1i08421jxlx791g8nh4l239syaj730hagkzc159g0z65614zz";
};
nativeBuildInputs = [ makeWrapper ];
buildPhase = ''
mkdir -p $out/bin $out/share/mu
cp -r lib $out/share/mu
gcc -O3 -o $out/bin/mu-unwrapped bootstrap/mu64.c
'';
installPhase = ''
makeWrapper $out/bin/mu-unwrapped $out/bin/mu \
--add-flags $out/share/mu/lib/core.mu
'';
meta = with lib; {
description = "Modern low-level programming language";
homepage = "https://github.com/nickmqb/muon";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -24,9 +24,10 @@
if platform.isDarwin then "macos"
else platform.parsed.kernel.name;
# Target triple. Rust has slightly different naming conventions than we use.
# Returns the name of the rust target, even if it is custom. Adjustments are
# because rust has slightly different naming conventions than we do.
toRustTarget = platform: with platform.parsed; let
cpu_ = platform.rustc.arch or {
cpu_ = platform.rustc.platform.arch or {
"armv7a" = "armv7";
"armv7l" = "armv7";
"armv6l" = "arm";
@ -34,6 +35,13 @@
in platform.rustc.config
or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
# Returns the name of the rust target if it is standard, or the json file
# containing the custom target spec.
toRustTargetSpec = platform:
if (platform.rustc or {}) ? platform
then builtins.toFile (toRustTarget platform + ".json") (builtins.toJSON platform.rustc.platform)
else toRustTarget platform;
# This just contains tools for now. But it would conceivably contain
# libraries too, say if we picked some default/recommended versions from
# `cratesIO` to build by Hydra and/or try to prefer/bias in Cargo.lock for

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