mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
Merge master into staging-next
This commit is contained in:
commit
0d8491cb2b
140
doc/languages-frameworks/go.section.md
Normal file
140
doc/languages-frameworks/go.section.md
Normal 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.
|
|
@ -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>
|
|
@ -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" />
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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 '<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>
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
@ -5515,7 +5521,7 @@
|
|||
name = "Marius Bakke";
|
||||
};
|
||||
mbaillie = {
|
||||
email = "martin@baillie.email";
|
||||
email = "martin@baillie.id";
|
||||
github = "martinbaillie";
|
||||
githubId = 613740;
|
||||
name = "Martin Baillie";
|
||||
|
@ -6971,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";
|
||||
|
|
|
@ -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
|
||||
|
|
165
nixos/modules/programs/proxychains.nix
Normal file
165
nixos/modules/programs/proxychains.nix
Normal 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 ];
|
||||
};
|
||||
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -25,7 +25,6 @@ let
|
|||
HTTP_ADDR = ${cfg.httpAddress}
|
||||
HTTP_PORT = ${toString cfg.httpPort}
|
||||
ROOT_URL = ${cfg.rootUrl}
|
||||
STATIC_ROOT_PATH = ${cfg.staticRootPath}
|
||||
|
||||
[session]
|
||||
COOKIE_NAME = session
|
||||
|
@ -179,13 +178,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
staticRootPath = mkOption {
|
||||
type = types.str;
|
||||
default = "${pkgs.gogs.data}";
|
||||
example = "/var/lib/gogs/data";
|
||||
description = "Upper level of template and static files path.";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -5,7 +5,7 @@ with lib;
|
|||
let
|
||||
cfg = config.services.xserver.windowManager.exwm;
|
||||
loadScript = pkgs.writeText "emacs-exwm-load" ''
|
||||
(require 'exwm)
|
||||
${cfg.loadScript}
|
||||
${optionalString cfg.enableDefaultConfig ''
|
||||
(require 'exwm-config)
|
||||
(exwm-config-default)
|
||||
|
@ -19,6 +19,18 @@ in
|
|||
options = {
|
||||
services.xserver.windowManager.exwm = {
|
||||
enable = mkEnableOption "exwm";
|
||||
loadScript = mkOption {
|
||||
default = "(require 'exwm)";
|
||||
example = literalExample ''
|
||||
(require 'exwm)
|
||||
(exwm-enable)
|
||||
'';
|
||||
description = ''
|
||||
Emacs lisp code to be run after loading the user's init
|
||||
file. If enableDefaultConfig is true, this will be run
|
||||
before loading the default config.
|
||||
'';
|
||||
};
|
||||
enableDefaultConfig = mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
|
|
|
@ -159,9 +159,14 @@ in
|
|||
|
||||
boot.initrd.extraUtilsCommandsTest = ''
|
||||
# sshd requires a host key to check config, so we pass in the test's
|
||||
tmpkey="$(mktemp initrd-ssh-testkey.XXXXXXXXXX)"
|
||||
cp "${../../../tests/initrd-network-ssh/ssh_host_ed25519_key}" "$tmpkey"
|
||||
# keys from Nix store are world-readable, which sshd doesn't like
|
||||
chmod 600 "$tmpkey"
|
||||
echo -n ${escapeShellArg sshdConfig} |
|
||||
$out/bin/sshd -t -f /dev/stdin \
|
||||
-h ${../../../tests/initrd-network-ssh/ssh_host_ed25519_key}
|
||||
-h "$tmpkey"
|
||||
rm "$tmpkey"
|
||||
'';
|
||||
|
||||
boot.initrd.network.postCommands = ''
|
||||
|
|
|
@ -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
12
nixos/tests/bat.nix
Normal 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
10
nixos/tests/jq.nix
Normal 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
12
nixos/tests/lsd.nix
Normal 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")
|
||||
'';
|
||||
})
|
37
nixos/tests/minecraft-server.nix
Normal file
37
nixos/tests/minecraft-server.nix
Normal 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
28
nixos/tests/minecraft.nix
Normal 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")
|
||||
'';
|
||||
})
|
|
@ -1,13 +1,13 @@
|
|||
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, curl, libnotify, gdk-pixbuf }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
version = "2018-10-11";
|
||||
version = "2020-07-23";
|
||||
pname = "cmusfm-unstable";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Arkq";
|
||||
repo = "cmusfm";
|
||||
rev = "ad2fd0aad3f4f1a25add1b8c2f179e8859885873";
|
||||
sha256 = "0wpwdwgyrp64nvwc6shy0n387p31j6aw6cnmfi9x2y1jhl5hbv6b";
|
||||
rev = "73df3e64d8aa3b5053b639615b8f81d512420e52";
|
||||
sha256 = "1p9i65v8hda9bsps4hm9m2b7aw9ivk4ncllg8svyp455gn5v8xx6";
|
||||
};
|
||||
# building
|
||||
configureFlags = [ "--enable-libnotify" ];
|
||||
|
|
34
pkgs/applications/audio/dsf2flac/default.nix
Normal file
34
pkgs/applications/audio/dsf2flac/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ stdenv
|
||||
, fetchurl
|
||||
, unzip
|
||||
, copyDesktopItems
|
||||
, makeDesktopItem
|
||||
, imagemagick
|
||||
, SDL
|
||||
|
@ -37,7 +38,7 @@ in stdenv.mkDerivation rec {
|
|||
};
|
||||
sourceRoot = (if isStereo then "gt2stereo/trunk" else "goattrk2") + "/src";
|
||||
|
||||
nativeBuildInputs = [ unzip imagemagick ];
|
||||
nativeBuildInputs = [ copyDesktopItems unzip imagemagick ];
|
||||
buildInputs = [ SDL ];
|
||||
|
||||
# PREFIX gets treated as BINDIR.
|
||||
|
@ -51,11 +52,16 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
# Other files get installed during the build phase.
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
convert goattrk2.bmp goattracker.png
|
||||
install -Dm644 goattracker.png $out/share/icons/hicolor/32x32/apps/goattracker.png
|
||||
${desktopItem.buildCommand}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [ desktopItem ];
|
||||
|
||||
meta = {
|
||||
description = "A crossplatform music editor for creating Commodore 64 music. Uses reSID library by Dag Lem and supports alternatively HardSID & CatWeasel devices"
|
||||
+ optionalString isStereo " - Stereo version";
|
||||
|
@ -66,4 +72,3 @@ in stdenv.mkDerivation rec {
|
|||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 {} \;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ stdenv, fetchFromGitHub }:
|
||||
stdenv.mkDerivation {
|
||||
name = "kak-auto-pairs";
|
||||
version = "2019-07-27";
|
||||
version = "2020-07-14";
|
||||
src = fetchFromGitHub {
|
||||
owner = "alexherbo2";
|
||||
repo = "auto-pairs.kak";
|
||||
rev = "886449b1a04d43e5deb2f0ef4b1aead6084c7a5f";
|
||||
sha256 = "0knfhdvslzw1f1r1k16733yhkczrg3yijjz6n2qwira84iv3239j";
|
||||
rev = "5b4b3b723c34c8b7f40cee60868204974349bf9f";
|
||||
sha256 = "1wgrv03f1lkzflbbaz8n23glij5rvfxf8pcqysd668mbx1hcrk9i";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
, lib
|
||||
, fetchFromGitLab
|
||||
, qmake
|
||||
, qtbase
|
||||
, qtcharts
|
||||
, qtsvg
|
||||
, marble
|
||||
|
@ -12,18 +11,17 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "zombietrackergps";
|
||||
version = "1.01";
|
||||
version = "1.03";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ldutils-projects";
|
||||
repo = pname;
|
||||
rev = "v_${version}";
|
||||
sha256 = "0h354ydbahy8rpkmzh5ym5bddbl6irjzklpcg6nbkv6apry84d48";
|
||||
sha256 = "1rmdy6kijmcxamm4mqmz8638xqisijlnpv8mimgxywpf90h9rrwq";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
ldutils
|
||||
qtbase
|
||||
qtcharts
|
||||
qtsvg
|
||||
marble.dev
|
||||
|
@ -49,7 +47,8 @@ mkDerivation rec {
|
|||
|
||||
meta = with lib; {
|
||||
description = "GPS track manager for Qt using KDE Marble maps";
|
||||
homepage = "https://gitlab.com/ldutils-projects/zombietrackergps";
|
||||
homepage = "https://www.zombietrackergps.net/ztgps/";
|
||||
changelog = "https://www.zombietrackergps.net/ztgps/history.html";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ sohalt ];
|
||||
platforms = platforms.linux;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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; [
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
version = "4.3.4";
|
||||
version = "4.4";
|
||||
|
||||
binpath = stdenv.lib.makeBinPath [
|
||||
cabextract
|
||||
|
@ -65,7 +65,7 @@ in stdenv.mkDerivation {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz";
|
||||
sha256 = "019dvb55zqrhlbx73p6913807ql866rm0j011ix5mkk2g79dzhqp";
|
||||
sha256 = "0n40927c8cnjackfns68zwl7h4d7dvhf7cyqdkazzwwx4k2xxvma";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -386,4 +386,6 @@ buildStdenv.mkDerivation ({
|
|||
|
||||
# on aarch64 this is also required
|
||||
dontUpdateAutotoolsGnuConfigScripts = true;
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
})
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
, glib, fontconfig, freetype, pango, cairo, libX11, libXi, atk, gconf, nss, nspr
|
||||
, libXcursor, libXext, libXfixes, libXrender, libXScrnSaver, libXcomposite, libxcb
|
||||
, alsaLib, libXdamage, libXtst, libXrandr, expat, cups
|
||||
, dbus, gtk2, gtk3, gdk-pixbuf, gcc-unwrapped, at-spi2-atk, at-spi2-core
|
||||
, dbus, gtk3, gdk-pixbuf, gcc-unwrapped, at-spi2-atk, at-spi2-core
|
||||
, kerberos, libdrm, mesa
|
||||
, libxkbcommon, wayland # ozone/wayland
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
, chromium
|
||||
|
||||
, gsettings-desktop-schemas
|
||||
, gnome2, gnome3
|
||||
, gnome3
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
@ -49,8 +49,6 @@ let
|
|||
};
|
||||
|
||||
version = chromium.upstream-info.version;
|
||||
gtk = if (versionAtLeast version "59.0.0.0") then gtk3 else gtk2;
|
||||
gnome = if (versionAtLeast version "59.0.0.0") then gnome3 else gnome2;
|
||||
|
||||
deps = [
|
||||
glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr
|
||||
|
@ -65,7 +63,7 @@ let
|
|||
kerberos libdrm mesa coreutils
|
||||
libxkbcommon wayland
|
||||
] ++ optional pulseSupport libpulseaudio
|
||||
++ [ gtk ];
|
||||
++ [ gtk3 ];
|
||||
|
||||
suffix = if channel != "stable" then "-" + channel else "";
|
||||
|
||||
|
@ -79,10 +77,10 @@ in stdenv.mkDerivation {
|
|||
nativeBuildInputs = [ patchelf makeWrapper ];
|
||||
buildInputs = [
|
||||
# needed for GSETTINGS_SCHEMAS_PATH
|
||||
gsettings-desktop-schemas glib gtk
|
||||
gsettings-desktop-schemas glib gtk3
|
||||
|
||||
# needed for XDG_ICON_DIRS
|
||||
gnome.adwaita-icon-theme
|
||||
gnome3.adwaita-icon-theme
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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 ];
|
||||
|
||||
|
|
|
@ -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)"];
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
, bzip2
|
||||
, cargo
|
||||
, common-updater-scripts
|
||||
, copyDesktopItems
|
||||
, coreutils
|
||||
, curl
|
||||
, dbus
|
||||
|
@ -83,6 +84,7 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [
|
||||
autoconf213
|
||||
cargo
|
||||
copyDesktopItems
|
||||
gnused
|
||||
llvmPackages.llvm
|
||||
m4
|
||||
|
@ -262,8 +264,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = let
|
||||
desktopItem = makeDesktopItem {
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
categories = lib.concatStringsSep ";" [ "Application" "Network" ];
|
||||
desktopName = "Thunderbird";
|
||||
genericName = "Mail Reader";
|
||||
|
@ -283,12 +285,11 @@ stdenv.mkDerivation rec {
|
|||
"x-scheme-handler/snews"
|
||||
"x-scheme-handler/nntp"
|
||||
];
|
||||
};
|
||||
in ''
|
||||
})
|
||||
];
|
||||
postInstall = ''
|
||||
# TODO: Move to a dev output?
|
||||
rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl
|
||||
|
||||
${desktopItem.buildCommand}
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
, bzip2
|
||||
, cargo
|
||||
, common-updater-scripts
|
||||
, copyDesktopItems
|
||||
, coreutils
|
||||
, curl
|
||||
, dbus
|
||||
|
@ -82,6 +83,7 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [
|
||||
autoconf213
|
||||
cargo
|
||||
copyDesktopItems
|
||||
gnused
|
||||
llvmPackages.llvm
|
||||
m4
|
||||
|
@ -257,8 +259,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = let
|
||||
desktopItem = makeDesktopItem {
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
categories = lib.concatStringsSep ";" [ "Application" "Network" ];
|
||||
desktopName = "Thunderbird";
|
||||
genericName = "Mail Reader";
|
||||
|
@ -278,12 +280,12 @@ stdenv.mkDerivation rec {
|
|||
"x-scheme-handler/snews"
|
||||
"x-scheme-handler/nntp"
|
||||
];
|
||||
};
|
||||
in ''
|
||||
})
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# TODO: Move to a dev output?
|
||||
rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl
|
||||
|
||||
${desktopItem.buildCommand}
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
|
@ -321,6 +323,8 @@ stdenv.mkDerivation rec {
|
|||
gnugrep curl runtimeShell;
|
||||
};
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A full-featured e-mail client";
|
||||
homepage = "https://www.thunderbird.net";
|
||||
|
|
66
pkgs/applications/networking/qv2ray/default.nix
Normal file
66
pkgs/applications/networking/qv2ray/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -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 = [
|
||||
|
|
|
@ -409,7 +409,11 @@ in (mkDrv rec {
|
|||
librevenge libe-book libmwaw glm ncurses epoxy
|
||||
libodfgen CoinMP librdf_rasqal gnome3.adwaita-icon-theme gettext
|
||||
]
|
||||
++ (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good ])
|
||||
++ (with gst_all_1; [
|
||||
gstreamer
|
||||
gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly
|
||||
gst-libav
|
||||
])
|
||||
++ lib.optional kdeIntegration [ qtbase qtx11extras kcoreaddons kio ];
|
||||
|
||||
passthru = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, autoPatchelfHook, makeDesktopItem, makeWrapper
|
||||
{ stdenv, fetchurl, autoPatchelfHook, makeDesktopItem, makeWrapper, copyDesktopItems
|
||||
|
||||
# Dynamic Libraries
|
||||
, curl, libGL, libX11, libXext, libXmu, libXrandr, libXrender
|
||||
|
@ -27,6 +27,7 @@ in stdenv.mkDerivation {
|
|||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
copyDesktopItems
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
|
@ -110,17 +111,14 @@ in stdenv.mkDerivation {
|
|||
# remove broken symbolic links
|
||||
find $out -xtype l -ls -exec rm {} \;
|
||||
|
||||
# Add desktop items
|
||||
${desktopItems.planmaker.buildCommand}
|
||||
${desktopItems.presentations.buildCommand}
|
||||
${desktopItems.textmaker.buildCommand}
|
||||
|
||||
# Add mime types
|
||||
install -D -t $out/share/mime/packages ${pname}/mime/softmaker-*office*${shortEdition}.xml
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = builtins.attrValues desktopItems;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An office suite with a word processor, spreadsheet and presentation program";
|
||||
homepage = "https://www.softmaker.com/";
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
, cups
|
||||
, dbus
|
||||
, expat
|
||||
, ffmpeg_3
|
||||
, ffmpeg
|
||||
, fontconfig
|
||||
, freetype
|
||||
, gdk-pixbuf
|
||||
|
@ -38,11 +38,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wpsoffice";
|
||||
version = "11.1.0.9505";
|
||||
version = "11.1.0.9615";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/9505/wps-office_11.1.0.9505.XA_amd64.deb";
|
||||
sha256 = "1bvaxwd3npw3kswk7k1p6mcbfg37x0ym4sp6xis6ykz870qivqk5";
|
||||
url = "http://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/9615/wps-office_11.1.0.9615.XA_amd64.deb";
|
||||
sha256 = "0dpd4njpizclllps3qagipycfws935rhj9k5gmdhjfgsk0ns188w";
|
||||
};
|
||||
unpackCmd = "dpkg -x $src .";
|
||||
sourceRoot = ".";
|
||||
|
@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
|
|||
cairo
|
||||
dbus.lib
|
||||
expat
|
||||
ffmpeg_3
|
||||
ffmpeg
|
||||
fontconfig
|
||||
freetype
|
||||
gdk-pixbuf
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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/)
|
||||
|
|
13
pkgs/applications/science/electronics/dsview/qt515.patch
Normal file
13
pkgs/applications/science/electronics/dsview/qt515.patch
Normal 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>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
version = "1.6.0";
|
||||
version = "1.7.0";
|
||||
arch = "x86_64";
|
||||
|
||||
desktopItem = makeDesktopItem rec {
|
||||
|
@ -25,7 +25,7 @@ in stdenv.mkDerivation {
|
|||
inherit version;
|
||||
src = fetchzip {
|
||||
url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-${version}-linux.gtk.${arch}.zip";
|
||||
sha256 = "1mgx4p5qykf9q0p4cp6kcpc7fx8g5f2w1g40kdgas24hqwrgs3cm";
|
||||
sha256 = "0v15wscawair5bghr5ixb4i062kmh9by1m0hnz2r1sawlqyafz02";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
|
43
pkgs/applications/science/math/gretl/default.nix
Normal file
43
pkgs/applications/science/math/gretl/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -203,6 +203,8 @@ let
|
|||
inherit (darwin.apple_sdk.frameworks) Security AppKit;
|
||||
};
|
||||
|
||||
glab = callPackage ./glab { };
|
||||
|
||||
grv = callPackage ./grv { };
|
||||
|
||||
hub = callPackage ./hub { };
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper
|
||||
{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper
|
||||
, git, bash, gzip, openssh, pam
|
||||
, sqliteSupport ? true
|
||||
, pamSupport ? true
|
||||
|
@ -6,25 +6,26 @@
|
|||
|
||||
with stdenv.lib;
|
||||
|
||||
buildGoPackage rec {
|
||||
buildGoModule rec {
|
||||
pname = "gogs";
|
||||
version = "0.11.91";
|
||||
version = "0.12.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gogs";
|
||||
repo = "gogs";
|
||||
rev = "v${version}";
|
||||
sha256 = "1yfimgjg9n773kdml17119539w9736mi66bivpv5yp3cj2hj9mlj";
|
||||
sha256 = "0ix3mxy8cpqbx24qffbzyf5z88x7605icm7rk5n54r8bdsr7cckd";
|
||||
};
|
||||
|
||||
patches = [ ./static-root-path.patch ];
|
||||
vendorSha256 = "0m0g4dsiq8p2ngsbjxfi3wff7x4xpm67qlhgcgf8b48mqai4d2gc";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
substituteInPlace pkg/setting/setting.go --subst-var data
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ makeWrapper openssh ];
|
||||
|
||||
buildInputs = optional pamSupport pam;
|
||||
|
||||
|
@ -34,18 +35,12 @@ buildGoPackage rec {
|
|||
( optional sqliteSupport "sqlite"
|
||||
++ optional pamSupport "pam");
|
||||
|
||||
outputs = [ "out" "data" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir $data
|
||||
cp -R $src/{public,templates} $data
|
||||
|
||||
wrapProgram $out/bin/gogs \
|
||||
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
|
||||
'';
|
||||
|
||||
goPackagePath = "github.com/gogs/gogs";
|
||||
|
||||
meta = {
|
||||
description = "A painless self-hosted Git service";
|
||||
homepage = "https://gogs.io";
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go
|
||||
index f206592d..796da6ef 100644
|
||||
--- a/pkg/setting/setting.go
|
||||
+++ b/pkg/setting/setting.go
|
||||
@@ -474,7 +474,7 @@ func NewContext() {
|
||||
LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(string(Protocol) + "://localhost:" + HTTPPort + "/")
|
||||
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
||||
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
|
||||
- StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir)
|
||||
+ StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString("@data@")
|
||||
AppDataPath = sec.Key("APP_DATA_PATH").MustString("data")
|
||||
EnableGzip = sec.Key("ENABLE_GZIP").MustBool()
|
||||
|
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "pitivi";
|
||||
version = "2020.09.1";
|
||||
version = "2020.09.2";
|
||||
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/pitivi/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1by52b56s9c3h23n40iccygkazwlhii2gb28zhnj2xz5805j05y2";
|
||||
sha256 = "0hzvv4wia4rk0kvq16y27imq2qd4q5lg3vx99hdcjdb1x3zqqfg0";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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}"}
|
||||
|
|
29
pkgs/build-support/rust/sysroot/Cargo.lock
generated
Normal file
29
pkgs/build-support/rust/sysroot/Cargo.lock
generated
Normal 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",
|
||||
]
|
45
pkgs/build-support/rust/sysroot/cargo.py
Normal file
45
pkgs/build-support/rust/sysroot/cargo.py
Normal 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)
|
41
pkgs/build-support/rust/sysroot/default.nix
Normal file
41
pkgs/build-support/rust/sysroot/default.nix
Normal 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
|
||||
'';
|
||||
}
|
21
pkgs/build-support/rust/sysroot/update-lockfile.sh
Executable file
21
pkgs/build-support/rust/sysroot/update-lockfile.sh
Executable 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"
|
||||
|
||||
|
42
pkgs/build-support/setup-hooks/copy-desktop-items.sh
Normal file
42
pkgs/build-support/setup-hooks/copy-desktop-items.sh
Normal file
|
@ -0,0 +1,42 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
# Setup hook that installs specified desktop items.
|
||||
#
|
||||
# Example usage in a derivation:
|
||||
#
|
||||
# { …, makeDesktopItem, copyDesktopItems, … }:
|
||||
#
|
||||
# let desktopItem = makeDesktopItem { … }; in
|
||||
# stdenv.mkDerivation {
|
||||
# …
|
||||
# nativeBuildInputs = [ copyDesktopItems ];
|
||||
#
|
||||
# desktopItems = [ desktopItem ];
|
||||
# …
|
||||
# }
|
||||
#
|
||||
# This hook will copy files which are either given by full path
|
||||
# or all '*.desktop' files placed inside the 'share/applications'
|
||||
# folder of each `desktopItems` argument.
|
||||
|
||||
postInstallHooks+=(copyDesktopItems)
|
||||
|
||||
copyDesktopItems() {
|
||||
if [ "${dontCopyDesktopItems-}" = 1 ]; then return; fi
|
||||
|
||||
if [ -z "$desktopItems" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
for desktopItem in $desktopItems; do
|
||||
if [[ -f "$desktopItem" ]]; then
|
||||
echo "Copying '$f' into '$out/share/applications'"
|
||||
install -D -m 444 -t "$out"/share/applications "$f"
|
||||
else
|
||||
for f in "$desktopItem"/share/applications/*.desktop; do
|
||||
echo "Copying '$f' into '$out/share/applications'"
|
||||
install -D -m 444 -t "$out"/share/applications "$f"
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
|
@ -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 = ".";
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, rustc }:
|
||||
{ stdenv, rustc, minimalContent ? true }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "rust-src";
|
||||
|
@ -6,6 +6,9 @@ stdenv.mkDerivation {
|
|||
phases = [ "unpackPhase" "installPhase" ];
|
||||
installPhase = ''
|
||||
mv src $out
|
||||
rm -rf $out/{ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,tools,vendor,stdarch}
|
||||
rm -rf $out/{${if minimalContent
|
||||
then "ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,tools,vendor,stdarch"
|
||||
else "ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,vendor"
|
||||
}}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
|
||||
, targetPackages
|
||||
, fetchurl, file, python3
|
||||
, llvm_10, darwin, cmake, rust, rustPlatform
|
||||
, pkgconfig, openssl
|
||||
|
@ -70,9 +71,9 @@ in stdenv.mkDerivation rec {
|
|||
"--set=build.cargo=${rustPlatform.rust.cargo}/bin/cargo"
|
||||
"--enable-rpath"
|
||||
"--enable-vendor"
|
||||
"--build=${rust.toRustTarget stdenv.buildPlatform}"
|
||||
"--host=${rust.toRustTarget stdenv.hostPlatform}"
|
||||
"--target=${rust.toRustTarget stdenv.targetPlatform}"
|
||||
"--build=${rust.toRustTargetSpec stdenv.buildPlatform}"
|
||||
"--host=${rust.toRustTargetSpec stdenv.hostPlatform}"
|
||||
"--target=${rust.toRustTargetSpec stdenv.targetPlatform}"
|
||||
|
||||
"${setBuild}.cc=${ccForBuild}"
|
||||
"${setHost}.cc=${ccForHost}"
|
||||
|
@ -92,6 +93,8 @@ in stdenv.mkDerivation rec {
|
|||
"${setTarget}.llvm-config=${llvmSharedForTarget}/bin/llvm-config"
|
||||
] ++ optionals (stdenv.isLinux && !stdenv.targetPlatform.isRedox) [
|
||||
"--enable-profiler" # build libprofiler_builtins
|
||||
] ++ optionals stdenv.targetPlatform.isMusl [
|
||||
"${setTarget}.musl-root=${targetPackages.stdenv.cc.libc}"
|
||||
];
|
||||
|
||||
# The bootstrap.py will generated a Makefile that then executes the build.
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
, ucsEncoding ? 4
|
||||
# For the Python package set
|
||||
, packageOverrides ? (self: super: {})
|
||||
, buildPackages
|
||||
, pkgsBuildBuild
|
||||
, pkgsBuildHost
|
||||
, pkgsBuildTarget
|
||||
, pkgsHostHost
|
||||
, pkgsTargetTarget
|
||||
|
@ -28,6 +28,7 @@
|
|||
, passthruFun
|
||||
, static ? false
|
||||
, enableOptimizations ? (!stdenv.isDarwin)
|
||||
, pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}"
|
||||
}:
|
||||
|
||||
assert x11Support -> tcl != null
|
||||
|
@ -38,9 +39,8 @@ assert x11Support -> tcl != null
|
|||
with stdenv.lib;
|
||||
|
||||
let
|
||||
|
||||
pythonAttr = "python${sourceVersion.major}${sourceVersion.minor}";
|
||||
pythonForBuild = buildPackages.${pythonAttr};
|
||||
buildPackages = pkgsBuildHost;
|
||||
inherit (passthru) pythonForBuild;
|
||||
|
||||
passthru = passthruFun rec {
|
||||
inherit self sourceVersion packageOverrides;
|
||||
|
@ -49,11 +49,12 @@ let
|
|||
executable = libPrefix;
|
||||
pythonVersion = with sourceVersion; "${major}.${minor}";
|
||||
sitePackages = "lib/${libPrefix}/site-packages";
|
||||
inherit hasDistutilsCxxPatch pythonForBuild;
|
||||
pythonPackagesBuildBuild = pkgsBuildBuild.${pythonAttr};
|
||||
pythonPackagesBuildTarget = pkgsBuildTarget.${pythonAttr};
|
||||
pythonPackagesHostHost = pkgsHostHost.${pythonAttr};
|
||||
pythonPackagesTargetTarget = pkgsTargetTarget.${pythonAttr} or {};
|
||||
inherit hasDistutilsCxxPatch;
|
||||
pythonOnBuildForBuild = pkgsBuildBuild.${pythonAttr};
|
||||
pythonOnBuildForHost = pkgsBuildHost.${pythonAttr};
|
||||
pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
|
||||
pythonOnHostForHost = pkgsHostHost.${pythonAttr};
|
||||
pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or {};
|
||||
} // {
|
||||
inherit ucsEncoding;
|
||||
};
|
||||
|
|
|
@ -19,12 +19,11 @@
|
|||
, nukeReferences
|
||||
# For the Python package set
|
||||
, packageOverrides ? (self: super: {})
|
||||
, buildPackages
|
||||
, pkgsBuildBuild
|
||||
, pkgsBuildHost
|
||||
, pkgsBuildTarget
|
||||
, pkgsHostHost
|
||||
, pkgsTargetTarget
|
||||
, pythonForBuild ? buildPackages.${pythonAttr}
|
||||
, sourceVersion
|
||||
, sha256
|
||||
, passthruFun
|
||||
|
@ -58,7 +57,8 @@ assert bluezSupport -> bluez != null;
|
|||
with stdenv.lib;
|
||||
|
||||
let
|
||||
|
||||
buildPackages = pkgsBuildHost;
|
||||
inherit (passthru) pythonForBuild;
|
||||
|
||||
passthru = passthruFun rec {
|
||||
inherit self sourceVersion packageOverrides;
|
||||
|
@ -67,11 +67,12 @@ let
|
|||
executable = libPrefix;
|
||||
pythonVersion = with sourceVersion; "${major}.${minor}";
|
||||
sitePackages = "lib/${libPrefix}/site-packages";
|
||||
inherit hasDistutilsCxxPatch pythonForBuild;
|
||||
pythonPackagesBuildBuild = pkgsBuildBuild.${pythonAttr};
|
||||
pythonPackagesBuildTarget = pkgsBuildTarget.${pythonAttr};
|
||||
pythonPackagesHostHost = pkgsHostHost.${pythonAttr};
|
||||
pythonPackagesTargetTarget = pkgsTargetTarget.${pythonAttr} or {};
|
||||
inherit hasDistutilsCxxPatch;
|
||||
pythonOnBuildForBuild = pkgsBuildBuild.${pythonAttr};
|
||||
pythonOnBuildForHost = pkgsBuildHost.${pythonAttr};
|
||||
pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
|
||||
pythonOnHostForHost = pkgsHostHost.${pythonAttr};
|
||||
pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or {};
|
||||
};
|
||||
|
||||
version = with sourceVersion; "${major}.${minor}.${patch}${suffix}";
|
||||
|
@ -95,8 +96,6 @@ let
|
|||
|
||||
hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false);
|
||||
|
||||
inherit pythonForBuild;
|
||||
|
||||
pythonForBuildInterpreter = if stdenv.hostPlatform == stdenv.buildPlatform then
|
||||
"$out/bin/python"
|
||||
else pythonForBuild.interpreter;
|
||||
|
|
|
@ -14,12 +14,12 @@ with pkgs;
|
|||
, packageOverrides
|
||||
, sitePackages
|
||||
, hasDistutilsCxxPatch
|
||||
, pythonPackagesBuildBuild
|
||||
, pythonForBuild # provides pythonPackagesBuildHost
|
||||
, pythonPackagesBuildTarget
|
||||
, pythonPackagesHostHost
|
||||
, self # is pythonPackagesHostTarget
|
||||
, pythonPackagesTargetTarget
|
||||
, pythonOnBuildForBuild
|
||||
, pythonOnBuildForHost
|
||||
, pythonOnBuildForTarget
|
||||
, pythonOnHostForHost
|
||||
, pythonOnTargetForTarget
|
||||
, self # is pythonOnHostForTarget
|
||||
}: let
|
||||
pythonPackages = callPackage
|
||||
({ pkgs, stdenv, python, overrides }: let
|
||||
|
@ -28,11 +28,11 @@ with pkgs;
|
|||
python = self;
|
||||
};
|
||||
otherSplices = {
|
||||
selfBuildBuild = pythonPackagesBuildBuild;
|
||||
selfBuildHost = pythonForBuild.pkgs;
|
||||
selfBuildTarget = pythonPackagesBuildTarget;
|
||||
selfHostHost = pythonPackagesHostHost;
|
||||
selfTargetTarget = pythonPackagesTargetTarget;
|
||||
selfBuildBuild = pythonOnBuildForBuild.pkgs;
|
||||
selfBuildHost = pythonOnBuildForHost.pkgs;
|
||||
selfBuildTarget = pythonOnBuildForTarget.pkgs;
|
||||
selfHostHost = pythonOnHostForHost.pkgs;
|
||||
selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget.
|
||||
};
|
||||
keep = self: {
|
||||
# TODO maybe only define these here so nothing is needed to be kept in sync.
|
||||
|
@ -99,7 +99,10 @@ with pkgs;
|
|||
inherit sourceVersion;
|
||||
pythonAtLeast = lib.versionAtLeast pythonVersion;
|
||||
pythonOlder = lib.versionOlder pythonVersion;
|
||||
inherit hasDistutilsCxxPatch pythonForBuild;
|
||||
inherit hasDistutilsCxxPatch;
|
||||
# TODO: rename to pythonOnBuild
|
||||
# Not done immediately because its likely used outside Nixpkgs.
|
||||
pythonForBuild = pythonOnBuildForHost;
|
||||
|
||||
tests = callPackage ./tests.nix {
|
||||
python = self;
|
||||
|
@ -188,7 +191,6 @@ in {
|
|||
# Minimal versions of Python (built without optional dependencies)
|
||||
python3Minimal = (python38.override {
|
||||
self = python3Minimal;
|
||||
pythonForBuild = pkgs.buildPackages.python3Minimal;
|
||||
# strip down that python version as much as possible
|
||||
openssl = null;
|
||||
readline = null;
|
||||
|
|
|
@ -5,10 +5,16 @@
|
|||
, python-setup-hook
|
||||
# For the Python package set
|
||||
, packageOverrides ? (self: super: {})
|
||||
, pkgsBuildBuild
|
||||
, pkgsBuildHost
|
||||
, pkgsBuildTarget
|
||||
, pkgsHostHost
|
||||
, pkgsTargetTarget
|
||||
, sourceVersion
|
||||
, pythonVersion
|
||||
, sha256
|
||||
, passthruFun
|
||||
, pythonAttr ? "pypy${stdenv.lib.substring 0 1 pythonVersion}${stdenv.lib.substring 2 3 pythonVersion}"
|
||||
}:
|
||||
|
||||
assert zlibSupport -> zlib != null;
|
||||
|
@ -25,12 +31,11 @@ let
|
|||
sitePackages = "site-packages";
|
||||
hasDistutilsCxxPatch = false;
|
||||
|
||||
# No cross-compiling for now.
|
||||
pythonForBuild = self;
|
||||
pythonPackagesBuildBuild = {};
|
||||
pythonPackagesBuildTarget = {};
|
||||
pythonPackagesHostHost = {};
|
||||
pythonPackagesTargetTarget = {};
|
||||
pythonOnBuildForBuild = pkgsBuildBuild.${pythonAttr};
|
||||
pythonOnBuildForHost = pkgsBuildHost.${pythonAttr};
|
||||
pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
|
||||
pythonOnHostForHost = pkgsHostHost.${pythonAttr};
|
||||
pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or {};
|
||||
};
|
||||
pname = passthru.executable;
|
||||
version = with sourceVersion; "${major}.${minor}.${patch}";
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ mkDerivation
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, qtbase
|
||||
, qtcharts
|
||||
, qtsvg
|
||||
, qmake
|
||||
|
@ -9,17 +8,16 @@
|
|||
|
||||
mkDerivation rec {
|
||||
pname = "ldutils";
|
||||
version = "1.01";
|
||||
version = "1.03";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ldutils-projects";
|
||||
repo = pname;
|
||||
rev = "v_${version}";
|
||||
sha256 = "09k2d5wj70xfr3sb4s9ajczq0lh65705pggs54zqqqjxazivbmgk";
|
||||
sha256 = "0pi05py71hh5vlhl0kjh9wxmd7yixw10s0kr2wb4l4c0abqxr82j";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qtcharts
|
||||
qtsvg
|
||||
];
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libavif";
|
||||
version = "0.8.3";
|
||||
version = "0.8.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AOMediaCodec";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1d6ql4vq338dvz61d5im06dh8m9rqfk37f9i356j3njpq604i1f6";
|
||||
sha256 = "1qvjd3xi9r89pcblxdgz4c6hqp67ss53b1x9zkg7lrik7g3lwq8d";
|
||||
};
|
||||
|
||||
# reco: encode libaom slowest but best, decode dav1d fastest
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libburn";
|
||||
version = "1.5.2";
|
||||
version = "1.5.2.pl01";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://files.libburnia-project.org/releases/${pname}-${version}.tar.gz";
|
||||
sha256 = "09sjrvq8xsj1gnl2wwyv4lbmicyzzl6x1ac2rrn53xnp34bxnckv";
|
||||
sha256 = "1xrp9c2sppbds0agqzmdym7rvdwpjrq6v6q2c3718cwvbjmh66c8";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -1,17 +1,25 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchgit, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libnova-0.12.3";
|
||||
pname = "libnova";
|
||||
version = "0.16";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/libnova/${name}.tar.gz";
|
||||
sha256 = "18mkx79gyhccp5zqhf6k66sbhv97s7839sg15534ijajirkhw9dc";
|
||||
# pull from git repo because upstream stopped tarball releases after v0.15
|
||||
src = fetchgit {
|
||||
url = "https://git.code.sf.net/p/libnova/${pname}";
|
||||
rev = "v${version}";
|
||||
sha256 = "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Celestial Mechanics, Astrometry and Astrodynamics Library";
|
||||
homepage = "http://libnova.sf.net";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ hjones2199 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ assert enablePython -> pythonPackages != null;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "librealsense";
|
||||
version = "2.38.0";
|
||||
version = "2.40.0";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||
owner = "IntelRealSense";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "12rs0gklgzn8bplqjmaxixk04pr870i333mmcp9i5bhkn8x86zbx";
|
||||
sha256 = "KZNriNDxRKR14KFJrAbzZLfSQ3iiZ8PKC80fVh0AQls=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nlopt";
|
||||
version = "2.6.1";
|
||||
version = "2.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stevengj";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1k6x14lgyfhfqpbs7xx8mrgklp8l6jkkcs39zgi2sj3kg6n0hdc9";
|
||||
sha256 = "0xm8y9cg5p2vgxbn8wn8gqfpxkbm0m4qsidp0bq1dqs8gvj9017v";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -24,10 +24,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# Hack to be able to run the test, broken because we use
|
||||
# CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install
|
||||
preBuild = if stdenv.isDarwin then ''
|
||||
export DYLD_LIBRARY_PATH="`pwd`''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
|
||||
preCheck = if stdenv.isDarwin then ''
|
||||
export DYLD_LIBRARY_PATH="$(pwd)''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
|
||||
'' else ''
|
||||
export LD_LIBRARY_PATH="`pwd`''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
export LD_LIBRARY_PATH="$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
|
|
|
@ -63,7 +63,8 @@ redoxRustPlatform.buildRustPackage rec {
|
|||
DESTDIR=$out make install
|
||||
'';
|
||||
|
||||
TARGET = buildPackages.rust.toRustTarget stdenvNoCC.targetPlatform;
|
||||
# TODO: should be hostPlatform
|
||||
TARGET = buildPackages.rust.toRustTargetSpec stdenvNoCC.targetPlatform;
|
||||
|
||||
cargoSha256 = "1fzz7ba3ga57x1cbdrcfrdwwjr70nh4skrpxp4j2gak2c3scj6rz";
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ let
|
|||
blasIntSize = if blas64 then "64" else "32";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "blis";
|
||||
version = "0.7.0";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flame";
|
||||
repo = "blis";
|
||||
rev = version;
|
||||
sha256 = "13g9kg7x8j9icg4frdq3wpl2cmp0jnh93mw48daa7ym399w17423";
|
||||
sha256 = "0fp0nskydan3i7sj7qkabwc9sjh7mw73pjpgzh50qchkkcv0s3n1";
|
||||
};
|
||||
|
||||
inherit blas64;
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tpm2-tss";
|
||||
version = "3.0.2";
|
||||
version = "3.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tpm2-software";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "07yz459xnj7cs99mfhnq8wr9cvkrnbd479scqyxz55nlimrg8dc9";
|
||||
sha256 = "106yhsjwjadxsl9dqxywg287mdwsksman02hdalhav18vcnvnlpj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "utf8proc";
|
||||
version = "2.5.0";
|
||||
version = "2.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JuliaStrings";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1xlkazhdnja4lksn5c9nf4bln5gjqa35a8gwlam5r0728w0h83qq";
|
||||
sha256 = "0czk8xw1jra0fjf6w4bcaridyz3wz2br3v7ik1g7z0j5grx9n8r1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ocaml${ocaml.version}-extlib-1.7.6";
|
||||
name = "ocaml${ocaml.version}-extlib-1.7.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ygrek.org.ua/p/release/ocaml-extlib/extlib-1.7.6.tar.gz";
|
||||
sha256 = "0wfs20v1yj5apdbj7214wdsr17ayh0qqq7ihidndvc8nmmwfa1dz";
|
||||
url = "http://ygrek.org.ua/p/release/ocaml-extlib/extlib-1.7.7.tar.gz";
|
||||
sha256 = "1sxmzc1mx3kg62j8kbk0dxkx8mkf1rn70h542cjzrziflznap0s1";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml findlib cppo ];
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
buildPecl {
|
||||
pname = "mongodb";
|
||||
|
||||
version = "1.8.2";
|
||||
sha256 = "01l300204ph9nd7khd9qazpdbi1biqvmjqbxbngdfjk9n5d8vvzw";
|
||||
version = "1.9.0";
|
||||
sha256 = "16mbw3p80qxsj86nmjbfch8wv6jaq8wbz4rlpmixvhj9nwbp37hs";
|
||||
|
||||
nativeBuildInputs = [ pkgs.pkgconfig ];
|
||||
buildInputs = with pkgs; [
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ mkDerivation, fetchurl, pkgs, lib, php }:
|
||||
let
|
||||
pname = "phpstan";
|
||||
version = "0.12.55";
|
||||
version = "0.12.57";
|
||||
in
|
||||
mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/phpstan/phpstan/releases/download/${version}/phpstan.phar";
|
||||
sha256 = "1qyywsivfal1d8485v2iyg5x3f9krnviv5nidgfv53ywrm9k4lgp";
|
||||
sha256 = "0i1ycfmi638myl9840k4rl0z9klk0q25l8ykkkfg20kx5mdidvgc";
|
||||
};
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ mkDerivation, fetchurl, pkgs, lib, php }:
|
||||
let
|
||||
pname = "psalm";
|
||||
version = "4.1.1";
|
||||
version = "4.2.1";
|
||||
in
|
||||
mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vimeo/psalm/releases/download/${version}/psalm.phar";
|
||||
sha256 = "05qjrg8wxlqxihv7xl31n73ygx7ykvcpbh2gq958iin4rr1bcy88";
|
||||
sha256 = "0g6s3bn8aaggpqjgr0bqchgkgb4my5ksfycyyqy7nrly2bgn1kbz";
|
||||
};
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
buildPecl {
|
||||
pname = "xdebug";
|
||||
|
||||
version = "2.9.8";
|
||||
sha256 = "12igfrdfisqfmfqpc321g93pm2w1y7h24bclmxjrjv6rb36bcmgm";
|
||||
version = "3.0.0";
|
||||
sha256 = "0qnaqgn2rdjxc70lyrm3nmy7cfma69c7zn6if23hhkhx5kl0fl44";
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
|
|
|
@ -1,32 +1,24 @@
|
|||
{ stdenv, buildPythonPackage, fetchPypi, fetchpatch
|
||||
, pep8, nose, unittest2, docutils, blockdiag, reportlab }:
|
||||
{ stdenv, buildPythonPackage, fetchPypi
|
||||
, nose, docutils, blockdiag, reportlab }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "actdiag";
|
||||
version = "0.5.4";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "983071777d9941093aaef3be1f67c198a8ac8d2bba264cdd1f337ca415ab46af";
|
||||
sha256 = "0g51v9dmdq18z33v332f1f0cmb3hqgaga5minj0mc2sglark1s7h";
|
||||
};
|
||||
|
||||
patches = fetchpatch {
|
||||
name = "drop_test_pep8.py.patch";
|
||||
url = "https://bitbucket.org/blockdiag/actdiag/commits/c1f2ed5947a1e93291f5860e4e30cee098bd635d/raw";
|
||||
sha256 = "1zxzwb0fvwlc8xgs45fx65341sjhb3h6l2p6rdj6i127vg1hsxb4";
|
||||
};
|
||||
propagatedBuildInputs = [ blockdiag docutils ];
|
||||
|
||||
buildInputs = [ pep8 nose unittest2 docutils ];
|
||||
|
||||
propagatedBuildInputs = [ blockdiag ];
|
||||
|
||||
checkInputs = [ reportlab ];
|
||||
checkInputs = [ nose reportlab ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Generate activity-diagram image from spec-text file (similar to Graphviz)";
|
||||
homepage = "http://blockdiag.com/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
maintainers = with maintainers; [ bjornfor SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue