mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-29 08:30:21 +02:00
Merge branch 'master' into bump-jira
This commit is contained in:
commit
ccf9257bb2
|
@ -6,7 +6,7 @@ When using Nix, you will frequently need to download source code and other files
|
|||
|
||||
Because fixed output derivations are _identified_ by their hash, a common mistake is to update a fetcher's URL or a version parameter, without updating the hash. **This will cause the old contents to be used.** So remember to always invalidate the hash argument.
|
||||
|
||||
For those who develop and maintain fetchers, a similar problem arises with changes to the implementation of a fetcher. These may cause a fixed output derivation to fail, but won't normally be caught by tests because the supposed output is already in the store or cache. For the purpose of testing, you can use a trick that is embodied by the [`invalidateFetcherByDrvHash`](#sec-pkgs-invalidateFetcherByDrvHash) function. It uses the derivation `name` to create a unique output path per fetcher implementation, defeating the caching precisely where it would be harmful.
|
||||
For those who develop and maintain fetchers, a similar problem arises with changes to the implementation of a fetcher. These may cause a fixed output derivation to fail, but won't normally be caught by tests because the supposed output is already in the store or cache. For the purpose of testing, you can use a trick that is embodied by the [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function. It uses the derivation `name` to create a unique output path per fetcher implementation, defeating the caching precisely where it would be harmful.
|
||||
|
||||
## `fetchurl` and `fetchzip` {#fetchurl}
|
||||
|
||||
|
|
|
@ -7,5 +7,4 @@
|
|||
</para>
|
||||
<xi:include href="special/fhs-environments.section.xml" />
|
||||
<xi:include href="special/mkshell.section.xml" />
|
||||
<xi:include href="special/invalidateFetcherByDrvHash.section.xml" />
|
||||
</chapter>
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
|
||||
## `invalidateFetcherByDrvHash` {#sec-pkgs-invalidateFetcherByDrvHash}
|
||||
|
||||
Use the derivation hash to invalidate the output via name, for testing.
|
||||
|
||||
Type: `(a@{ name, ... } -> Derivation) -> a -> Derivation`
|
||||
|
||||
Normally, fixed output derivations can and should be cached by their output
|
||||
hash only, but for testing we want to re-fetch everytime the fetcher changes.
|
||||
|
||||
Changes to the fetcher become apparent in the drvPath, which is a hash of
|
||||
how to fetch, rather than a fixed store path.
|
||||
By inserting this hash into the name, we can make sure to re-run the fetcher
|
||||
every time the fetcher changes.
|
||||
|
||||
This relies on the assumption that Nix isn't clever enough to reuse its
|
||||
database of local store contents to optimize fetching.
|
||||
|
||||
You might notice that the "salted" name derives from the normal invocation,
|
||||
not the final derivation. `invalidateFetcherByDrvHash` has to invoke the fetcher
|
||||
function twice: once to get a derivation hash, and again to produce the final
|
||||
fixed output derivation.
|
||||
|
||||
Example:
|
||||
|
||||
tests.fetchgit = invalidateFetcherByDrvHash fetchgit {
|
||||
name = "nix-source";
|
||||
url = "https://github.com/NixOS/nix";
|
||||
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
|
||||
sha256 = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
|
||||
};
|
82
doc/builders/testers.chapter.md
Normal file
82
doc/builders/testers.chapter.md
Normal file
|
@ -0,0 +1,82 @@
|
|||
# Testers {#chap-testers}
|
||||
This chapter describes several testing builders which are available in the <literal>testers</literal> namespace.
|
||||
|
||||
## `testVersion` {#tester-testVersion}
|
||||
|
||||
Checks the command output contains the specified version
|
||||
|
||||
Although simplistic, this test assures that the main program
|
||||
can run. While there's no substitute for a real test case,
|
||||
it does catch dynamic linking errors and such. It also provides
|
||||
some protection against accidentally building the wrong version,
|
||||
for example when using an 'old' hash in a fixed-output derivation.
|
||||
|
||||
Examples:
|
||||
|
||||
```nix
|
||||
passthru.tests.version = testVersion { package = hello; };
|
||||
|
||||
passthru.tests.version = testVersion {
|
||||
package = seaweedfs;
|
||||
command = "weed version";
|
||||
};
|
||||
|
||||
passthru.tests.version = testVersion {
|
||||
package = key;
|
||||
command = "KeY --help";
|
||||
# Wrong '2.5' version in the code. Drop on next version.
|
||||
version = "2.5";
|
||||
};
|
||||
```
|
||||
|
||||
## `testEqualDerivation` {#tester-testEqualDerivation}
|
||||
|
||||
Checks that two packages produce the exact same build instructions.
|
||||
|
||||
This can be used to make sure that a certain difference of configuration,
|
||||
such as the presence of an overlay does not cause a cache miss.
|
||||
|
||||
When the derivations are equal, the return value is an empty file.
|
||||
Otherwise, the build log explains the difference via `nix-diff`.
|
||||
|
||||
Example:
|
||||
|
||||
```nix
|
||||
testEqualDerivation
|
||||
"The hello package must stay the same when enabling checks."
|
||||
hello
|
||||
(hello.overrideAttrs(o: { doCheck = true; }))
|
||||
```
|
||||
|
||||
## `invalidateFetcherByDrvHash` {#tester-invalidateFetcherByDrvHash}
|
||||
|
||||
Use the derivation hash to invalidate the output via name, for testing.
|
||||
|
||||
Type: `(a@{ name, ... } -> Derivation) -> a -> Derivation`
|
||||
|
||||
Normally, fixed output derivations can and should be cached by their output
|
||||
hash only, but for testing we want to re-fetch everytime the fetcher changes.
|
||||
|
||||
Changes to the fetcher become apparent in the drvPath, which is a hash of
|
||||
how to fetch, rather than a fixed store path.
|
||||
By inserting this hash into the name, we can make sure to re-run the fetcher
|
||||
every time the fetcher changes.
|
||||
|
||||
This relies on the assumption that Nix isn't clever enough to reuse its
|
||||
database of local store contents to optimize fetching.
|
||||
|
||||
You might notice that the "salted" name derives from the normal invocation,
|
||||
not the final derivation. `invalidateFetcherByDrvHash` has to invoke the fetcher
|
||||
function twice: once to get a derivation hash, and again to produce the final
|
||||
fixed output derivation.
|
||||
|
||||
Example:
|
||||
|
||||
```nix
|
||||
tests.fetchgit = invalidateFetcherByDrvHash fetchgit {
|
||||
name = "nix-source";
|
||||
url = "https://github.com/NixOS/nix";
|
||||
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
|
||||
sha256 = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
|
||||
};
|
||||
```
|
49
doc/languages-frameworks/chicken.section.md
Normal file
49
doc/languages-frameworks/chicken.section.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
# CHICKEN {#sec-chicken}
|
||||
|
||||
[CHICKEN](https://call-cc.org/) is a
|
||||
[R⁵RS](https://schemers.org/Documents/Standards/R5RS/HTML/)-compliant Scheme
|
||||
compiler. It includes an interactive mode and a custom package format, "eggs".
|
||||
|
||||
## Using Eggs
|
||||
|
||||
Eggs described in nixpkgs are available inside the
|
||||
`chickenPackages.chickenEggs` attrset. Including an egg as a build input is
|
||||
done in the typical Nix fashion. For example, to include support for [SRFI
|
||||
189](https://srfi.schemers.org/srfi-189/srfi-189.html) in a derivation, one
|
||||
might write:
|
||||
|
||||
```nix
|
||||
buildInputs = [
|
||||
chicken
|
||||
chickenPackages.chickenEggs.srfi-189
|
||||
];
|
||||
```
|
||||
|
||||
Both `chicken` and its eggs have a setup hook which configures the environment
|
||||
variables `CHICKEN_INCLUDE_PATH` and `CHICKEN_REPOSITORY_PATH`.
|
||||
|
||||
## Updating Eggs
|
||||
|
||||
nixpkgs only knows about a subset of all published eggs. It uses
|
||||
[egg2nix](https://github.com/the-kenny/egg2nix) to generate a
|
||||
package set from a list of eggs to include.
|
||||
|
||||
The package set is regenerated by running the following shell commands:
|
||||
|
||||
```
|
||||
$ nix-shell -p chickenPackages.egg2nix
|
||||
$ cd pkgs/development/compilers/chicken/5/
|
||||
$ egg2nix eggs.scm > eggs.nix
|
||||
```
|
||||
|
||||
## Adding Eggs
|
||||
|
||||
When we run `egg2nix`, we obtain one collection of eggs with
|
||||
mutually-compatible versions. This means that when we add new eggs, we may
|
||||
need to update existing eggs. To keep those separate, follow the procedure for
|
||||
updating eggs before including more eggs.
|
||||
|
||||
To include more eggs, edit `pkgs/development/compilers/chicken/5/eggs.scm`.
|
||||
The first section of this file lists eggs which are required by `egg2nix`
|
||||
itself; all other eggs go into the second section. After editing, follow the
|
||||
procedure for updating eggs.
|
|
@ -9,6 +9,7 @@
|
|||
<xi:include href="android.section.xml" />
|
||||
<xi:include href="beam.section.xml" />
|
||||
<xi:include href="bower.section.xml" />
|
||||
<xi:include href="chicken.section.xml" />
|
||||
<xi:include href="coq.section.xml" />
|
||||
<xi:include href="crystal.section.xml" />
|
||||
<xi:include href="cuda.section.xml" />
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<title>Builders</title>
|
||||
<xi:include href="builders/fetchers.chapter.xml" />
|
||||
<xi:include href="builders/trivial-builders.chapter.xml" />
|
||||
<xi:include href="builders/testers.chapter.xml" />
|
||||
<xi:include href="builders/special.xml" />
|
||||
<xi:include href="builders/images.xml" />
|
||||
<xi:include href="hooks/index.xml" />
|
||||
|
|
|
@ -253,10 +253,7 @@ rec {
|
|||
=> false
|
||||
*/
|
||||
hasInfix = infix: content:
|
||||
let
|
||||
drop = x: substring 1 (stringLength x) x;
|
||||
in hasPrefix infix content
|
||||
|| content != "" && hasInfix infix (drop content);
|
||||
builtins.match ".*${escapeRegex infix}.*" content != null;
|
||||
|
||||
/* Convert a string to a list of characters (i.e. singleton strings).
|
||||
This allows you to, e.g., map a function over each character. However,
|
||||
|
|
|
@ -675,6 +675,12 @@
|
|||
githubId = 858965;
|
||||
name = "Andrew Morsillo";
|
||||
};
|
||||
an-empty-string = {
|
||||
name = "Tris Emmy Wilson";
|
||||
email = "tris@tris.fyi";
|
||||
github = "an-empty-string";
|
||||
githubId = 681716;
|
||||
};
|
||||
andehen = {
|
||||
email = "git@andehen.net";
|
||||
github = "andehen";
|
||||
|
@ -1043,8 +1049,8 @@
|
|||
name = "Kirill Boltaev";
|
||||
};
|
||||
ashley = {
|
||||
email = "personavinny@protonmail.com";
|
||||
github = "paranoidcat";
|
||||
email = "ashley@kira64.xyz";
|
||||
github = "kira64xyz";
|
||||
githubId = 84152630;
|
||||
name = "Ashley Chiara";
|
||||
};
|
||||
|
@ -3843,6 +3849,13 @@
|
|||
githubId = 222467;
|
||||
name = "Dmitry Ivanov";
|
||||
};
|
||||
ethindp = {
|
||||
name = "Ethin Probst";
|
||||
email = "harlydavidsen@gmail.com";
|
||||
matrix = "@ethindp:the-gdn.net";
|
||||
github = "ethindp";
|
||||
githubId = 8030501;
|
||||
};
|
||||
Etjean = {
|
||||
email = "et.jean@outlook.fr";
|
||||
github = "Etjean";
|
||||
|
@ -7190,6 +7203,13 @@
|
|||
githubId = 714;
|
||||
name = "Lily Ballard";
|
||||
};
|
||||
lilyinstarlight = {
|
||||
email = "lily@lily.flowers";
|
||||
matrix = "@lily:lily.flowers";
|
||||
github = "lilyinstarlight";
|
||||
githubId = 298109;
|
||||
name = "Lily Foster";
|
||||
};
|
||||
limeytexan = {
|
||||
email = "limeytexan@gmail.com";
|
||||
github = "limeytexan";
|
||||
|
@ -8850,6 +8870,12 @@
|
|||
githubId = 3747396;
|
||||
name = "Nathan Isom";
|
||||
};
|
||||
neilmayhew = {
|
||||
email = "nix@neil.mayhew.name";
|
||||
github = "neilmayhew";
|
||||
githubId = 166791;
|
||||
name = "Neil Mayhew";
|
||||
};
|
||||
nelsonjeppesen = {
|
||||
email = "nix@jeppesen.io";
|
||||
github = "NelsonJeppesen";
|
||||
|
|
|
@ -159,34 +159,42 @@ The following methods are available on machine objects:
|
|||
`execute`
|
||||
|
||||
: Execute a shell command, returning a list `(status, stdout)`.
|
||||
|
||||
Commands are run with `set -euo pipefail` set:
|
||||
|
||||
- If several commands are separated by `;` and one fails, the
|
||||
command as a whole will fail.
|
||||
|
||||
- For pipelines, the last non-zero exit status will be returned
|
||||
(if there is one; otherwise zero will be returned).
|
||||
|
||||
- Dereferencing unset variables fails the command.
|
||||
|
||||
- It will wait for stdout to be closed.
|
||||
|
||||
If the command detaches, it must close stdout, as `execute` will wait
|
||||
for this to consume all output reliably. This can be achieved by
|
||||
redirecting stdout to stderr `>&2`, to `/dev/console`, `/dev/null` or
|
||||
a file. Examples of detaching commands are `sleep 365d &`, where the
|
||||
shell forks a new process that can write to stdout and `xclip -i`, where
|
||||
the `xclip` command itself forks without closing stdout.
|
||||
|
||||
Takes an optional parameter `check_return` that defaults to `True`.
|
||||
Setting this parameter to `False` will not check for the return code
|
||||
and return -1 instead. This can be used for commands that shut down
|
||||
the VM and would therefore break the pipe that would be used for
|
||||
retrieving the return code.
|
||||
|
||||
A timeout for the command can be specified (in seconds) using the optional
|
||||
`timeout` parameter, e.g., `execute(cmd, timeout=10)` or
|
||||
`execute(cmd, timeout=None)`. The default is 900 seconds.
|
||||
|
||||
`succeed`
|
||||
|
||||
: Execute a shell command, raising an exception if the exit status is
|
||||
not zero, otherwise returning the standard output. Commands are run
|
||||
with `set -euo pipefail` set:
|
||||
|
||||
- If several commands are separated by `;` and one fails, the
|
||||
command as a whole will fail.
|
||||
|
||||
- For pipelines, the last non-zero exit status will be returned
|
||||
(if there is one, zero will be returned otherwise).
|
||||
|
||||
- Dereferencing unset variables fail the command.
|
||||
|
||||
- It will wait for stdout to be closed. See `execute` for the
|
||||
implications.
|
||||
not zero, otherwise returning the standard output. Similar to `execute`,
|
||||
except that the timeout is `None` by default. See `execute` for details on
|
||||
command execution.
|
||||
|
||||
`fail`
|
||||
|
||||
|
@ -196,10 +204,13 @@ The following methods are available on machine objects:
|
|||
`wait_until_succeeds`
|
||||
|
||||
: Repeat a shell command with 1-second intervals until it succeeds.
|
||||
Has a default timeout of 900 seconds which can be modified, e.g.
|
||||
`wait_until_succeeds(cmd, timeout=10)`. See `execute` for details on
|
||||
command execution.
|
||||
|
||||
`wait_until_fails`
|
||||
|
||||
: Repeat a shell command with 1-second intervals until it fails.
|
||||
: Like `wait_until_succeeds`, but repeating the command until it fails.
|
||||
|
||||
`wait_for_unit`
|
||||
|
||||
|
|
|
@ -274,35 +274,9 @@ start_all()
|
|||
<listitem>
|
||||
<para>
|
||||
Execute a shell command, returning a list
|
||||
<literal>(status, stdout)</literal>. If the command
|
||||
detaches, it must close stdout, as
|
||||
<literal>execute</literal> will wait for this to consume all
|
||||
output reliably. This can be achieved by redirecting stdout
|
||||
to stderr <literal>>&2</literal>, to
|
||||
<literal>/dev/console</literal>,
|
||||
<literal>/dev/null</literal> or a file. Examples of
|
||||
detaching commands are <literal>sleep 365d &</literal>,
|
||||
where the shell forks a new process that can write to stdout
|
||||
and <literal>xclip -i</literal>, where the
|
||||
<literal>xclip</literal> command itself forks without
|
||||
closing stdout. Takes an optional parameter
|
||||
<literal>check_return</literal> that defaults to
|
||||
<literal>True</literal>. Setting this parameter to
|
||||
<literal>False</literal> will not check for the return code
|
||||
and return -1 instead. This can be used for commands that
|
||||
shut down the VM and would therefore break the pipe that
|
||||
would be used for retrieving the return code.
|
||||
<literal>(status, stdout)</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>succeed</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Execute a shell command, raising an exception if the exit
|
||||
status is not zero, otherwise returning the standard output.
|
||||
Commands are run with <literal>set -euo pipefail</literal>
|
||||
set:
|
||||
</para>
|
||||
|
@ -317,22 +291,63 @@ start_all()
|
|||
<listitem>
|
||||
<para>
|
||||
For pipelines, the last non-zero exit status will be
|
||||
returned (if there is one, zero will be returned
|
||||
otherwise).
|
||||
returned (if there is one; otherwise zero will be
|
||||
returned).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Dereferencing unset variables fail the command.
|
||||
Dereferencing unset variables fails the command.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
It will wait for stdout to be closed. See
|
||||
<literal>execute</literal> for the implications.
|
||||
It will wait for stdout to be closed.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
If the command detaches, it must close stdout, as
|
||||
<literal>execute</literal> will wait for this to consume all
|
||||
output reliably. This can be achieved by redirecting stdout
|
||||
to stderr <literal>>&2</literal>, to
|
||||
<literal>/dev/console</literal>,
|
||||
<literal>/dev/null</literal> or a file. Examples of
|
||||
detaching commands are <literal>sleep 365d &</literal>,
|
||||
where the shell forks a new process that can write to stdout
|
||||
and <literal>xclip -i</literal>, where the
|
||||
<literal>xclip</literal> command itself forks without
|
||||
closing stdout.
|
||||
</para>
|
||||
<para>
|
||||
Takes an optional parameter <literal>check_return</literal>
|
||||
that defaults to <literal>True</literal>. Setting this
|
||||
parameter to <literal>False</literal> will not check for the
|
||||
return code and return -1 instead. This can be used for
|
||||
commands that shut down the VM and would therefore break the
|
||||
pipe that would be used for retrieving the return code.
|
||||
</para>
|
||||
<para>
|
||||
A timeout for the command can be specified (in seconds)
|
||||
using the optional <literal>timeout</literal> parameter,
|
||||
e.g., <literal>execute(cmd, timeout=10)</literal> or
|
||||
<literal>execute(cmd, timeout=None)</literal>. The default
|
||||
is 900 seconds.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>succeed</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Execute a shell command, raising an exception if the exit
|
||||
status is not zero, otherwise returning the standard output.
|
||||
Similar to <literal>execute</literal>, except that the
|
||||
timeout is <literal>None</literal> by default. See
|
||||
<literal>execute</literal> for details on command execution.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -353,7 +368,10 @@ start_all()
|
|||
<listitem>
|
||||
<para>
|
||||
Repeat a shell command with 1-second intervals until it
|
||||
succeeds.
|
||||
succeeds. Has a default timeout of 900 seconds which can be
|
||||
modified, e.g.
|
||||
<literal>wait_until_succeeds(cmd, timeout=10)</literal>. See
|
||||
<literal>execute</literal> for details on command execution.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -363,8 +381,8 @@ start_all()
|
|||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Repeat a shell command with 1-second intervals until it
|
||||
fails.
|
||||
Like <literal>wait_until_succeeds</literal>, but repeating
|
||||
the command until it fails.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -375,6 +375,14 @@
|
|||
<link xlink:href="options.html#opt-services.headscale.enable">services.headscale</link>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="https://github.com/lakinduakash/linux-wifi-hotspot">create_ap</link>,
|
||||
a module for creating wifi hotspots using the program
|
||||
linux-wifi-hotspot. Available as
|
||||
<link xlink:href="options.html#opt-services.create_ap.enable">services.create_ap</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="https://0xerr0r.github.io/blocky/">blocky</link>,
|
||||
|
@ -2347,6 +2355,15 @@
|
|||
generating host-global NNCP configuration.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The option <literal>services.snapserver.openFirewall</literal>
|
||||
will no longer default to <literal>true</literal> starting
|
||||
with NixOS 22.11. Enable it explicitly if you need to control
|
||||
Snapserver remotely or connect streamig clients from other
|
||||
hosts.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -107,6 +107,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- [headscale](https://github.com/juanfont/headscale), an Open Source implementation of the [Tailscale](https://tailscale.io) Control Server. Available as [services.headscale](options.html#opt-services.headscale.enable)
|
||||
|
||||
- [create_ap](https://github.com/lakinduakash/linux-wifi-hotspot), a module for creating wifi hotspots using the program linux-wifi-hotspot. Available as [services.create_ap](options.html#opt-services.create_ap.enable).
|
||||
|
||||
- [blocky](https://0xerr0r.github.io/blocky/), fast and lightweight DNS proxy as ad-blocker for local network with many features.
|
||||
|
||||
- [pacemaker](https://clusterlabs.org/pacemaker/) cluster resource manager
|
||||
|
@ -830,4 +832,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- The `programs.nncp` options were added for generating host-global NNCP configuration.
|
||||
|
||||
- The option `services.snapserver.openFirewall` will no longer default to
|
||||
`true` starting with NixOS 22.11. Enable it explicitly if you need to control
|
||||
Snapserver remotely or connect streamig clients from other hosts.
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
|
|
@ -526,10 +526,17 @@ class Machine:
|
|||
self.run_callbacks()
|
||||
self.connect()
|
||||
|
||||
if timeout is not None:
|
||||
command = "timeout {} sh -c {}".format(timeout, shlex.quote(command))
|
||||
# Always run command with shell opts
|
||||
command = f"set -euo pipefail; {command}"
|
||||
|
||||
timeout_str = ""
|
||||
if timeout is not None:
|
||||
timeout_str = f"timeout {timeout}"
|
||||
|
||||
out_command = (
|
||||
f"{timeout_str} sh -c {shlex.quote(command)} | (base64 --wrap 0; echo)\n"
|
||||
)
|
||||
|
||||
out_command = f"( set -euo pipefail; {command} ) | (base64 --wrap 0; echo)\n"
|
||||
assert self.shell
|
||||
self.shell.send(out_command.encode())
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
x86_64-linux = "/nix/store/0n2wfvi1i3fg97cjc54wslvk0804y0sn-nix-2.7.0";
|
||||
i686-linux = "/nix/store/4p27c1k9z99pli6x8cxfph20yfyzn9nh-nix-2.7.0";
|
||||
aarch64-linux = "/nix/store/r9yr8ijsb0gi9r7y92y3yzyld59yp0kj-nix-2.7.0";
|
||||
x86_64-darwin = "/nix/store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0";
|
||||
aarch64-darwin = "/nix/store/9l96qllhbb6xrsjaai76dn74ap7rq92n-nix-2.7.0";
|
||||
x86_64-linux = "/nix/store/yx36yzxpw1hn4fz8iyf1rfyd56jg3yf4-nix-2.8.0";
|
||||
i686-linux = "/nix/store/c0hg806zvwg800qbszzj8ff4a224kjgf-nix-2.8.0";
|
||||
aarch64-linux = "/nix/store/wic2832ll53q392r2wks4xr2nrk7p8p5-nix-2.8.0";
|
||||
x86_64-darwin = "/nix/store/5yqdvnkmkrhl36xh0qy31pymdphjimdd-nix-2.8.0";
|
||||
aarch64-darwin = "/nix/store/izc9592szrnpv8n86hr88bhpyc9g6b4s-nix-2.8.0";
|
||||
}
|
||||
|
|
|
@ -206,6 +206,11 @@ in
|
|||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
|
@ -740,6 +740,7 @@
|
|||
./services/networking/coredns.nix
|
||||
./services/networking/corerad.nix
|
||||
./services/networking/coturn.nix
|
||||
./services/networking/create_ap.nix
|
||||
./services/networking/croc.nix
|
||||
./services/networking/dante.nix
|
||||
./services/networking/ddclient.nix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -101,6 +101,8 @@ in {
|
|||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
# Make the behavior consistent with other services. Set the default to
|
||||
# false and remove the accompanying warning after NixOS 22.05 is released.
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to automatically open the specified ports in the firewall.
|
||||
|
@ -273,10 +275,16 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
# https://github.com/badaix/snapcast/blob/98ac8b2fb7305084376607b59173ce4097c620d8/server/streamreader/stream_manager.cpp#L85
|
||||
warnings = filter (w: w != "") (mapAttrsToList (k: v: if v.type == "spotify" then ''
|
||||
services.snapserver.streams.${k}.type = "spotify" is deprecated, use services.snapserver.streams.${k}.type = "librespot" instead.
|
||||
'' else "") cfg.streams);
|
||||
warnings =
|
||||
# https://github.com/badaix/snapcast/blob/98ac8b2fb7305084376607b59173ce4097c620d8/server/streamreader/stream_manager.cpp#L85
|
||||
filter (w: w != "") (mapAttrsToList (k: v: if v.type == "spotify" then ''
|
||||
services.snapserver.streams.${k}.type = "spotify" is deprecated, use services.snapserver.streams.${k}.type = "librespot" instead.
|
||||
'' else "") cfg.streams)
|
||||
# Remove this warning after NixOS 22.05 is released.
|
||||
++ optional (options.services.snapserver.openFirewall.highestPrio >= (mkOptionDefault null).priority) ''
|
||||
services.snapserver.openFirewall will no longer default to true starting with NixOS 22.11.
|
||||
Enable it explicitly if you need to control Snapserver remotely.
|
||||
'';
|
||||
|
||||
systemd.services.snapserver = {
|
||||
after = [ "network.target" ];
|
||||
|
@ -304,8 +312,8 @@ in {
|
|||
|
||||
networking.firewall.allowedTCPPorts =
|
||||
optionals cfg.openFirewall [ cfg.port ]
|
||||
++ optional cfg.tcp.enable cfg.tcp.port
|
||||
++ optional cfg.http.enable cfg.http.port;
|
||||
++ optional (cfg.openFirewall && cfg.tcp.enable) cfg.tcp.port
|
||||
++ optional (cfg.openFirewall && cfg.http.enable) cfg.http.port;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -80,13 +80,21 @@ in
|
|||
The name of the interface to pull the bind_addr from.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
forceAddrFamily = mkOption {
|
||||
type = types.enum [ "any" "ipv4" "ipv6" ];
|
||||
default = "any";
|
||||
description = ''
|
||||
Whether to bind ipv4/ipv6 or both kind of addresses.
|
||||
'';
|
||||
};
|
||||
|
||||
forceIpv4 = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
Deprecated: Use consul.forceAddrFamily instead.
|
||||
Whether we should force the interfaces to only pull ipv4 addresses.
|
||||
'';
|
||||
};
|
||||
|
@ -175,6 +183,13 @@ in
|
|||
systemPackages = [ cfg.package ];
|
||||
};
|
||||
|
||||
warnings = lib.flatten [
|
||||
(lib.optional (cfg.forceIpv4 != null) ''
|
||||
The option consul.forceIpv4 is deprecated, please use
|
||||
consul.forceAddrFamily instead.
|
||||
'')
|
||||
];
|
||||
|
||||
systemd.services.consul = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ] ++ systemdDevices;
|
||||
|
@ -196,15 +211,21 @@ in
|
|||
});
|
||||
|
||||
path = with pkgs; [ iproute2 gnugrep gawk consul ];
|
||||
preStart = ''
|
||||
preStart = let
|
||||
family = if cfg.forceAddrFamily == "ipv6" then
|
||||
"-6"
|
||||
else if cfg.forceAddrFamily == "ipv4" then
|
||||
"-4"
|
||||
else
|
||||
"";
|
||||
in ''
|
||||
mkdir -m 0700 -p ${dataDir}
|
||||
chown -R consul ${dataDir}
|
||||
|
||||
# Determine interface addresses
|
||||
getAddrOnce () {
|
||||
ip addr show dev "$1" \
|
||||
| grep 'inet${optionalString (cfg.forceIpv4) " "}.*scope global' \
|
||||
| awk -F '[ /\t]*' '{print $3}' | head -n 1
|
||||
ip ${family} addr show dev "$1" scope global \
|
||||
| awk -F '[ /\t]*' '/inet/ {print $3}' | head -n 1
|
||||
}
|
||||
getAddr () {
|
||||
ADDR="$(getAddrOnce $1)"
|
||||
|
@ -234,6 +255,11 @@ in
|
|||
};
|
||||
}
|
||||
|
||||
# deprecated
|
||||
(mkIf (cfg.forceIpv4 != null && cfg.forceIpv4) {
|
||||
services.consul.forceAddrFamily = "ipv4";
|
||||
})
|
||||
|
||||
(mkIf (cfg.alerts.enable) {
|
||||
systemd.services.consul-alerts = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
|
50
nixos/modules/services/networking/create_ap.nix
Normal file
50
nixos/modules/services/networking/create_ap.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.create_ap;
|
||||
configFile = pkgs.writeText "create_ap.conf" (generators.toKeyValue { } cfg.settings);
|
||||
in {
|
||||
options = {
|
||||
services.create_ap = {
|
||||
enable = mkEnableOption "setup wifi hotspots using create_ap";
|
||||
settings = mkOption {
|
||||
type = with types; attrsOf (oneOf [ int bool str ]);
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for <package>create_ap</package>.
|
||||
See <link xlink:href="https://raw.githubusercontent.com/lakinduakash/linux-wifi-hotspot/master/src/scripts/create_ap.conf">upstream example configuration</link>
|
||||
for supported values.
|
||||
'';
|
||||
example = {
|
||||
INTERNET_IFACE = "eth0";
|
||||
WIFI_IFACE = "wlan0";
|
||||
SSID = "My Wifi Hotspot";
|
||||
PASSPHRASE = "12345678";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd = {
|
||||
services.create_ap = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Create AP Service";
|
||||
after = [ "network.target" ];
|
||||
restartTriggers = [ configFile ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.linux-wifi-hotspot}/bin/create_ap --config ${configFile}";
|
||||
KillSignal = "SIGINT";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ onny ];
|
||||
|
||||
}
|
|
@ -151,6 +151,7 @@ in
|
|||
users.users.${cfg.user} = {
|
||||
isSystemUser = true;
|
||||
group = cfg.group;
|
||||
home = cfg.home;
|
||||
};
|
||||
|
||||
users.groups.${cfg.group} = {};
|
||||
|
|
|
@ -22,6 +22,9 @@ let
|
|||
favorite-apps=[ 'org.gnome.Epiphany.desktop', 'org.gnome.Geary.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop' ]
|
||||
'';
|
||||
|
||||
nixos-background-ligtht = pkgs.nixos-artwork.wallpapers.simple-blue;
|
||||
nixos-background-dark = pkgs.nixos-artwork.wallpapers.simple-dark-gray;
|
||||
|
||||
nixos-gsettings-desktop-schemas = let
|
||||
defaultPackages = with pkgs; [ gsettings-desktop-schemas gnome.gnome-shell ];
|
||||
in
|
||||
|
@ -42,11 +45,11 @@ let
|
|||
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
|
||||
cat - > $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF
|
||||
[org.gnome.desktop.background]
|
||||
picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-blue.gnomeFilePath}'
|
||||
picture-uri-dark='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}'
|
||||
picture-uri='file://${nixos-background-ligtht.gnomeFilePath}'
|
||||
picture-uri-dark='file://${nixos-background-dark.gnomeFilePath}'
|
||||
|
||||
[org.gnome.desktop.screensaver]
|
||||
picture-uri='file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath}'
|
||||
picture-uri='file://${nixos-background-dark.gnomeFilePath}'
|
||||
|
||||
${cfg.favoriteAppsOverride}
|
||||
|
||||
|
@ -56,6 +59,26 @@ let
|
|||
${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
|
||||
'';
|
||||
|
||||
nixos-background-info = pkgs.writeTextFile rec {
|
||||
name = "nixos-background-info";
|
||||
text = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
|
||||
<wallpapers>
|
||||
<wallpaper deleted="false">
|
||||
<name>Blobs</name>
|
||||
<filename>${nixos-background-ligtht.gnomeFilePath}</filename>
|
||||
<filename-dark>${nixos-background-dark.gnomeFilePath}</filename-dark>
|
||||
<options>zoom</options>
|
||||
<shade_type>solid</shade_type>
|
||||
<pcolor>#3a4ba0</pcolor>
|
||||
<scolor>#2f302f</scolor>
|
||||
</wallpaper>
|
||||
</wallpapers>
|
||||
'';
|
||||
destination = "/share/gnome-background-properties/nixos.xml";
|
||||
};
|
||||
|
||||
flashbackEnabled = cfg.flashback.enableMetacity || length cfg.flashback.customSessions > 0;
|
||||
flashbackWms = optional cfg.flashback.enableMetacity {
|
||||
wmName = "metacity";
|
||||
|
@ -431,6 +454,7 @@ in
|
|||
# Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-38/elements/core/meta-gnome-core-shell.bst
|
||||
environment.systemPackages = with pkgs.gnome; [
|
||||
adwaita-icon-theme
|
||||
nixos-background-info
|
||||
gnome-backgrounds
|
||||
gnome-bluetooth
|
||||
gnome-color-manager
|
||||
|
@ -439,8 +463,6 @@ in
|
|||
gnome-shell-extensions
|
||||
gnome-themes-extra
|
||||
pkgs.gnome-tour # GNOME Shell detects the .desktop file on first log-in.
|
||||
pkgs.nixos-artwork.wallpapers.simple-dark-gray
|
||||
pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom
|
||||
pkgs.gnome-user-docs
|
||||
pkgs.orca
|
||||
pkgs.glib # for gsettings
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
luks = config.boot.initrd.luks;
|
||||
kernelPackages = config.boot.kernelPackages;
|
||||
defaultPrio = (mkOptionDefault {}).priority;
|
||||
|
||||
commonFunctions = ''
|
||||
die() {
|
||||
|
@ -474,6 +475,16 @@ let
|
|||
preLVM = filterAttrs (n: v: v.preLVM) luks.devices;
|
||||
postLVM = filterAttrs (n: v: !v.preLVM) luks.devices;
|
||||
|
||||
stage1Crypttab = pkgs.writeText "initrd-crypttab" (lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: let
|
||||
opts = v.crypttabExtraOpts
|
||||
++ optional v.allowDiscards "discard"
|
||||
++ optionals v.bypassWorkqueues [ "no-read-workqueue" "no-write-workqueue" ]
|
||||
++ optional (v.header != null) "header=${v.header}"
|
||||
++ optional (v.keyFileOffset != null) "keyfile-offset=${v.keyFileOffset}"
|
||||
++ optional (v.keyFileSize != null) "keyfile-size=${v.keyFileSize}"
|
||||
;
|
||||
in "${n} ${v.device} ${if v.keyFile == null then "-" else v.keyFile} ${lib.concatStringsSep "," opts}") luks.devices));
|
||||
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
@ -802,6 +813,18 @@ in
|
|||
Commands that should be run right after we have mounted our LUKS device.
|
||||
'';
|
||||
};
|
||||
|
||||
crypttabExtraOpts = mkOption {
|
||||
type = with types; listOf singleLineStr;
|
||||
default = [];
|
||||
example = [ "_netdev" ];
|
||||
visible = false;
|
||||
description = ''
|
||||
Only used with systemd stage 1.
|
||||
|
||||
Extra options to append to the last column of the generated crypttab file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
@ -853,6 +876,31 @@ in
|
|||
-> versionAtLeast kernelPackages.kernel.version "5.9";
|
||||
message = "boot.initrd.luks.devices.<name>.bypassWorkqueues is not supported for kernels older than 5.9";
|
||||
}
|
||||
|
||||
{ assertion = config.boot.initrd.systemd.enable -> all (dev: !dev.fallbackToPassword) (attrValues luks.devices);
|
||||
message = "boot.initrd.luks.devices.<name>.fallbackToPassword is implied by systemd stage 1.";
|
||||
}
|
||||
{ assertion = config.boot.initrd.systemd.enable -> all (dev: dev.preLVM) (attrValues luks.devices);
|
||||
message = "boot.initrd.luks.devices.<name>.preLVM is not used by systemd stage 1.";
|
||||
}
|
||||
{ assertion = config.boot.initrd.systemd.enable -> options.boot.initrd.luks.reusePassphrases.highestPrio == defaultPrio;
|
||||
message = "boot.initrd.luks.reusePassphrases has no effect with systemd stage 1.";
|
||||
}
|
||||
{ assertion = config.boot.initrd.systemd.enable -> all (dev: dev.preOpenCommands == "" && dev.postOpenCommands == "") (attrValues luks.devices);
|
||||
message = "boot.initrd.luks.devices.<name>.preOpenCommands and postOpenCommands is not supported by systemd stage 1. Please bind a service to cryptsetup.target or cryptsetup-pre.target instead.";
|
||||
}
|
||||
# TODO
|
||||
{ assertion = config.boot.initrd.systemd.enable -> !luks.gpgSupport;
|
||||
message = "systemd stage 1 does not support GPG smartcards yet.";
|
||||
}
|
||||
# TODO
|
||||
{ assertion = config.boot.initrd.systemd.enable -> !luks.fido2Support;
|
||||
message = "systemd stage 1 does not support FIDO2 yet.";
|
||||
}
|
||||
# TODO
|
||||
{ assertion = config.boot.initrd.systemd.enable -> !luks.yubikeySupport;
|
||||
message = "systemd stage 1 does not support Yubikeys yet.";
|
||||
}
|
||||
];
|
||||
|
||||
# actually, sbp2 driver is the one enabling the DMA attack, but this needs to be tested
|
||||
|
@ -867,7 +915,7 @@ in
|
|||
++ (if builtins.elem "xts" luks.cryptoModules then ["ecb"] else []);
|
||||
|
||||
# copy the cryptsetup binary and it's dependencies
|
||||
boot.initrd.extraUtilsCommands = ''
|
||||
boot.initrd.extraUtilsCommands = mkIf (!config.boot.initrd.systemd.enable) ''
|
||||
copy_bin_and_libs ${pkgs.cryptsetup}/bin/cryptsetup
|
||||
copy_bin_and_libs ${askPass}/bin/cryptsetup-askpass
|
||||
sed -i s,/bin/sh,$out/bin/sh, $out/bin/cryptsetup-askpass
|
||||
|
@ -915,7 +963,7 @@ in
|
|||
''}
|
||||
'';
|
||||
|
||||
boot.initrd.extraUtilsCommandsTest = ''
|
||||
boot.initrd.extraUtilsCommandsTest = mkIf (!config.boot.initrd.systemd.enable) ''
|
||||
$out/bin/cryptsetup --version
|
||||
${optionalString luks.yubikeySupport ''
|
||||
$out/bin/ykchalresp -V
|
||||
|
@ -932,9 +980,27 @@ in
|
|||
''}
|
||||
'';
|
||||
|
||||
boot.initrd.preFailCommands = postCommands;
|
||||
boot.initrd.preLVMCommands = commonFunctions + preCommands + concatStrings (mapAttrsToList openCommand preLVM) + postCommands;
|
||||
boot.initrd.postDeviceCommands = commonFunctions + preCommands + concatStrings (mapAttrsToList openCommand postLVM) + postCommands;
|
||||
boot.initrd.systemd = {
|
||||
contents."/etc/crypttab".source = stage1Crypttab;
|
||||
|
||||
extraBin.systemd-cryptsetup = "${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup";
|
||||
|
||||
additionalUpstreamUnits = [
|
||||
"cryptsetup-pre.target"
|
||||
"cryptsetup.target"
|
||||
"remote-cryptsetup.target"
|
||||
];
|
||||
storePaths = [
|
||||
"${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup"
|
||||
];
|
||||
|
||||
};
|
||||
# We do this because we need the udev rules from the package
|
||||
boot.initrd.services.lvm.enable = true;
|
||||
|
||||
boot.initrd.preFailCommands = mkIf (!config.boot.initrd.systemd.enable) postCommands;
|
||||
boot.initrd.preLVMCommands = mkIf (!config.boot.initrd.systemd.enable) (commonFunctions + preCommands + concatStrings (mapAttrsToList openCommand preLVM) + postCommands);
|
||||
boot.initrd.postDeviceCommands = mkIf (!config.boot.initrd.systemd.enable) (commonFunctions + preCommands + concatStrings (mapAttrsToList openCommand postLVM) + postCommands);
|
||||
|
||||
environment.systemPackages = [ pkgs.cryptsetup ];
|
||||
};
|
||||
|
|
|
@ -420,7 +420,7 @@ let
|
|||
${lib.optionalString (config.boot.initrd.secrets == {})
|
||||
"exit 0"}
|
||||
|
||||
export PATH=${pkgs.coreutils}/bin:${pkgs.cpio}/bin:${pkgs.gzip}/bin:${pkgs.findutils}/bin
|
||||
export PATH=${pkgs.coreutils}/bin:${pkgs.libarchive}/bin:${pkgs.gzip}/bin:${pkgs.findutils}/bin
|
||||
|
||||
function cleanup {
|
||||
if [ -n "$tmp" -a -d "$tmp" ]; then
|
||||
|
@ -440,7 +440,7 @@ let
|
|||
) config.boot.initrd.secrets)
|
||||
}
|
||||
|
||||
(cd "$tmp" && find . -print0 | sort -z | cpio --quiet -o -H newc -R +0:+0 --reproducible --null) | \
|
||||
(cd "$tmp" && find . -print0 | sort -z | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @-) | \
|
||||
${compressorExe} ${lib.escapeShellArgs initialRamdisk.compressorArgs} >> "$1"
|
||||
'';
|
||||
|
||||
|
|
|
@ -524,6 +524,8 @@ in
|
|||
systemd-confinement = handleTest ./systemd-confinement.nix {};
|
||||
systemd-cryptenroll = handleTest ./systemd-cryptenroll.nix {};
|
||||
systemd-escaping = handleTest ./systemd-escaping.nix {};
|
||||
systemd-initrd-luks-keyfile = handleTest ./systemd-initrd-luks-keyfile.nix {};
|
||||
systemd-initrd-luks-password = handleTest ./systemd-initrd-luks-password.nix {};
|
||||
systemd-initrd-shutdown = handleTest ./systemd-shutdown.nix { systemdStage1 = true; };
|
||||
systemd-initrd-simple = handleTest ./systemd-initrd-simple.nix {};
|
||||
systemd-initrd-swraid = handleTest ./systemd-initrd-swraid.nix {};
|
||||
|
|
|
@ -299,6 +299,13 @@ let
|
|||
virtualisation.qemu.diskInterface =
|
||||
if grubVersion == 1 then "scsi" else "virtio";
|
||||
|
||||
# We don't want to have any networking in the guest whatsoever.
|
||||
# Also, if any vlans are enabled, the guest will reboot
|
||||
# (with a different configuration for legacy reasons),
|
||||
# and spend 5 minutes waiting for the vlan interface to show up
|
||||
# (which will never happen).
|
||||
virtualisation.vlans = [];
|
||||
|
||||
boot.loader.systemd-boot.enable = mkIf (bootLoader == "systemd-boot") true;
|
||||
|
||||
hardware.enableAllFirmware = mkForce false;
|
||||
|
@ -313,6 +320,7 @@ let
|
|||
docbook5
|
||||
docbook_xsl_ns
|
||||
kmod.dev
|
||||
libarchive.dev
|
||||
libxml2.bin
|
||||
libxslt.bin
|
||||
nixos-artwork.wallpapers.simple-dark-gray-bottom
|
||||
|
|
|
@ -31,7 +31,7 @@ import ./make-test-python.nix (
|
|||
|
||||
# Create a fake cache with Nginx service the static files
|
||||
server.succeed(
|
||||
"nix copy --to file:///var/www ${pkgs.hello}"
|
||||
"nix --experimental-features nix-command copy --to file:///var/www ${pkgs.hello}"
|
||||
)
|
||||
server.wait_for_unit("nginx.service")
|
||||
server.wait_for_open_port(80)
|
||||
|
|
|
@ -19,6 +19,7 @@ in {
|
|||
port = port;
|
||||
tcp.port = tcpPort;
|
||||
http.port = httpPort;
|
||||
openFirewall = true;
|
||||
buffer = bufferSize;
|
||||
streams = {
|
||||
mpd = {
|
||||
|
|
|
@ -9,6 +9,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
|||
'';
|
||||
in
|
||||
{
|
||||
name = "step-ca";
|
||||
nodes =
|
||||
{
|
||||
caserver =
|
||||
|
|
53
nixos/tests/systemd-initrd-luks-keyfile.nix
Normal file
53
nixos/tests/systemd-initrd-luks-keyfile.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
import ./make-test-python.nix ({ lib, pkgs, ... }: let
|
||||
|
||||
keyfile = pkgs.writeText "luks-keyfile" ''
|
||||
MIGHAoGBAJ4rGTSo/ldyjQypd0kuS7k2OSsmQYzMH6TNj3nQ/vIUjDn7fqa3slt2
|
||||
gV6EK3TmTbGc4tzC1v4SWx2m+2Bjdtn4Fs4wiBwn1lbRdC6i5ZYCqasTWIntWn+6
|
||||
FllUkMD5oqjOR/YcboxG8Z3B5sJuvTP9llsF+gnuveWih9dpbBr7AgEC
|
||||
'';
|
||||
|
||||
in {
|
||||
name = "systemd-initrd-luks-keyfile";
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
# Use systemd-boot
|
||||
virtualisation = {
|
||||
emptyDiskImages = [ 512 ];
|
||||
useBootLoader = true;
|
||||
useEFIBoot = true;
|
||||
};
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ cryptsetup ];
|
||||
boot.initrd.systemd = {
|
||||
enable = true;
|
||||
emergencyAccess = true;
|
||||
};
|
||||
|
||||
specialisation.boot-luks.configuration = {
|
||||
boot.initrd.luks.devices = lib.mkVMOverride {
|
||||
cryptroot = {
|
||||
device = "/dev/vdc";
|
||||
keyFile = "/etc/cryptroot.key";
|
||||
};
|
||||
};
|
||||
virtualisation.bootDevice = "/dev/mapper/cryptroot";
|
||||
boot.initrd.systemd.contents."/etc/cryptroot.key".source = keyfile;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# Create encrypted volume
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("cryptsetup luksFormat -q --iter-time=1 -d ${keyfile} /dev/vdc")
|
||||
|
||||
# Boot from the encrypted disk
|
||||
machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks.conf")
|
||||
machine.succeed("sync")
|
||||
machine.crash()
|
||||
|
||||
# Boot and decrypt the disk
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
assert "/dev/mapper/cryptroot on / type ext4" in machine.succeed("mount")
|
||||
'';
|
||||
})
|
48
nixos/tests/systemd-initrd-luks-password.nix
Normal file
48
nixos/tests/systemd-initrd-luks-password.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
||||
name = "systemd-initrd-luks-password";
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
# Use systemd-boot
|
||||
virtualisation = {
|
||||
emptyDiskImages = [ 512 512 ];
|
||||
useBootLoader = true;
|
||||
useEFIBoot = true;
|
||||
};
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ cryptsetup ];
|
||||
boot.initrd.systemd = {
|
||||
enable = true;
|
||||
emergencyAccess = true;
|
||||
};
|
||||
|
||||
specialisation.boot-luks.configuration = {
|
||||
boot.initrd.luks.devices = lib.mkVMOverride {
|
||||
# We have two disks and only type one password - key reuse is in place
|
||||
cryptroot.device = "/dev/vdc";
|
||||
cryptroot2.device = "/dev/vdd";
|
||||
};
|
||||
virtualisation.bootDevice = "/dev/mapper/cryptroot";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# Create encrypted volume
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdc -")
|
||||
machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdd -")
|
||||
|
||||
# Boot from the encrypted disk
|
||||
machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks.conf")
|
||||
machine.succeed("sync")
|
||||
machine.crash()
|
||||
|
||||
# Boot and decrypt the disk
|
||||
machine.start()
|
||||
machine.wait_for_console_text("Please enter passphrase for disk cryptroot")
|
||||
machine.send_console("supersecret\n")
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
assert "/dev/mapper/cryptroot on / type ext4" in machine.succeed("mount")
|
||||
'';
|
||||
})
|
|
@ -30,10 +30,11 @@ import ../make-test-python.nix ({pkgs, ...}:
|
|||
'';
|
||||
};
|
||||
|
||||
services.redis = {
|
||||
services.redis.servers.peertube = {
|
||||
enable = true;
|
||||
bind = "0.0.0.0";
|
||||
requirePass = "turrQfaQwnanGbcsdhxy";
|
||||
port = 6379;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -109,7 +110,7 @@ import ../make-test-python.nix ({pkgs, ...}:
|
|||
start_all()
|
||||
|
||||
database.wait_for_unit("postgresql.service")
|
||||
database.wait_for_unit("redis.service")
|
||||
database.wait_for_unit("redis-peertube.service")
|
||||
|
||||
database.wait_for_open_port(5432)
|
||||
database.wait_for_open_port(6379)
|
||||
|
|
46
pkgs/applications/accessibility/espeakup/default.nix
Normal file
46
pkgs/applications/accessibility/espeakup/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, meson
|
||||
, ninja
|
||||
, espeak-ng
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, ronn
|
||||
, alsa-lib
|
||||
, systemd
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "espeakup";
|
||||
version = "0.90";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linux-speakup";
|
||||
repo = "espeakup";
|
||||
rev = "v${version}";
|
||||
sha256 = "0lmjwafvfxy07zn18v3dzjwwpnid2xffgvy2dzlwkbns8gb60ds2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
ronn
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
espeak-ng
|
||||
alsa-lib
|
||||
systemd
|
||||
];
|
||||
|
||||
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/linux-speakup/espeakup";
|
||||
description = "Lightweight connector for espeak-ng and speakup";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ ethindp ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
36
pkgs/applications/accessibility/wvkbd/default.nix
Normal file
36
pkgs/applications/accessibility/wvkbd/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, wayland-scanner
|
||||
, wayland
|
||||
, pango
|
||||
, glib
|
||||
, harfbuzz
|
||||
, cairo
|
||||
, pkg-config
|
||||
, libxkbcommon
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wvkbd";
|
||||
version = "0.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jjsullivan5196";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-5UV2PMrLXtF3AxjfPxxwFRkgVef+Ap8nG1v795o0bWE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ wayland-scanner wayland pango glib harfbuzz cairo libxkbcommon ];
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jjsullivan5196/wvkbd";
|
||||
description = "On-screen keyboard for wlroots";
|
||||
maintainers = [ maintainers.elohmeier ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bitwig-studio";
|
||||
version = "4.2.2";
|
||||
version = "4.2.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
|
||||
sha256 = "sha256-cpEV0EWW9vd2ZE+RaqN9fhyy7axgPlx4PmlOeX3TSfY=";
|
||||
sha256 = "sha256-UCafrjrEwwHkhPum7sTOjtXzy7PNeK5/aeKg+b3CGJU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ft2-clone";
|
||||
version = "1.52";
|
||||
version = "1.54";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "8bitbubsy";
|
||||
repo = "ft2-clone";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-RyZ3PV7jaTN3DEYMT0BqKDHbb+7/IgiRaCra1xA0h1A=";
|
||||
sha256 = "sha256-lNiQ0X2vvPGubb4Pde+eh0Z6ClCQgigIUM+PddaiVUg=";
|
||||
};
|
||||
|
||||
# Adapt the linux-only CMakeLists to darwin (more reliable than make-macos.sh)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, gitUpdater
|
||||
, testVersion
|
||||
, testers
|
||||
, furnace
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
|
@ -83,7 +83,7 @@ stdenv.mkDerivation rec {
|
|||
inherit pname version;
|
||||
rev-prefix = "v";
|
||||
};
|
||||
tests.version = testVersion {
|
||||
tests.version = testers.testVersion {
|
||||
package = furnace;
|
||||
# The command always exits with code 1
|
||||
command = "(furnace --version || [ $? -eq 1 ])";
|
||||
|
|
|
@ -2,18 +2,31 @@
|
|||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, pipewire
|
||||
, pulseaudio
|
||||
, gst_all_1
|
||||
, glibmm
|
||||
, qmake
|
||||
, qtbase
|
||||
, qtsvg
|
||||
, wrapQtAppsHook
|
||||
, makeDesktopItem
|
||||
, pkg-config
|
||||
, libarchive
|
||||
, fetchpatch
|
||||
, copyDesktopItems
|
||||
, usePipewire ? true
|
||||
, usePulseaudio ? false
|
||||
}:
|
||||
|
||||
mkDerivation rec{
|
||||
assert lib.asserts.assertMsg (usePipewire != usePulseaudio) "You need to enable one and only one of pulseaudio or pipewire support";
|
||||
|
||||
let
|
||||
pluginPath = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good ]);
|
||||
in
|
||||
mkDerivation rec {
|
||||
pname = "jamesdsp";
|
||||
version = "2.3";
|
||||
src = fetchFromGitHub rec{
|
||||
src = fetchFromGitHub rec {
|
||||
owner = "Audio4Linux";
|
||||
repo = "JDSP4Linux";
|
||||
fetchSubmodules = true;
|
||||
|
@ -29,13 +42,30 @@ mkDerivation rec{
|
|||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ qmake pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
qmake
|
||||
pkg-config
|
||||
copyDesktopItems
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glibmm
|
||||
libarchive
|
||||
pipewire
|
||||
qtbase
|
||||
qtsvg
|
||||
] ++ lib.optional usePipewire pipewire
|
||||
++ lib.optionals usePulseaudio [
|
||||
pulseaudio
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gstreamer
|
||||
];
|
||||
|
||||
qtWrapperArgs = lib.optionals usePulseaudio [ "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${pluginPath}" ];
|
||||
|
||||
qmakeFlags = lib.optionals usePulseaudio [ "CONFIG+=USE_PULSEAUDIO" ];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "jamesdsp";
|
||||
|
@ -54,7 +84,7 @@ mkDerivation rec{
|
|||
description = "An audio effect processor for PipeWire clients";
|
||||
homepage = "https://github.com/Audio4Linux/JDSP4Linux";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers;[ pasqui23 ];
|
||||
maintainers = with maintainers; [ pasqui23 rewine ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pt2-clone";
|
||||
version = "1.43";
|
||||
version = "1.46";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "8bitbubsy";
|
||||
repo = "pt2-clone";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-+sHGjgDqizv/9n0dDj8knsl+4MBfO3/pMkmD+MPsuNM=";
|
||||
sha256 = "sha256-xRq37hjuMiGxsWRnZ/ryXYLvQpjbfQEjQkMjjuqL7r8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
appimageTools.wrapType2 rec {
|
||||
pname = "sonixd";
|
||||
version = "0.15.0";
|
||||
version = "0.15.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jeffvli/sonixd/releases/download/v${version}/Sonixd-${version}-linux-x86_64.AppImage";
|
||||
sha256 = "sha256-mZdM2wPJktitSCgIyOY/GwYPixPVTnYiOBVMQN8b7XU=";
|
||||
sha256 = "sha256-23WU1nwvrzyw0J+Pplm3JbsScjJxu+RhmwVoe/PjozY=";
|
||||
};
|
||||
|
||||
extraInstallCommands = ''
|
||||
|
|
|
@ -21,19 +21,19 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "spot";
|
||||
version = "0.3.1";
|
||||
version = "0.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xou816";
|
||||
repo = "spot";
|
||||
rev = version;
|
||||
hash = "sha256-uZzylK9imEazwC/ogsDO8ZBvByE5/SNSV+mIlp7Z9Ww=";
|
||||
hash = "sha256-0iuLZq9FSxaOchxx6LzGwpY8qnOq2APl/qkBYzEV2uw=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-v5xdlsI6OlEpCYOTFePTyI8BkIrAwT6FR2JwiRTGgOA=";
|
||||
hash = "sha256-g46BkrTv6tdrGe/p245O4cBoPjbvyRP7U6hH1Hp4ja0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
, flac
|
||||
, sox
|
||||
, util-linux
|
||||
, testVersion
|
||||
, testers
|
||||
, whipper
|
||||
}:
|
||||
|
||||
|
@ -74,7 +74,7 @@ in python3.pkgs.buildPythonApplication rec {
|
|||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru.tests.version = testVersion {
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = whipper;
|
||||
command = "HOME=$TMPDIR whipper --version";
|
||||
};
|
||||
|
|
|
@ -14,16 +14,16 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "alfis";
|
||||
version = "0.6.11";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Revertron";
|
||||
repo = "Alfis";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-vm/JBJh58UaSem18RpJuPUzM2GCy4RfCb6Hr1B7KWQA=";
|
||||
sha256 = "sha256-lamobXaDY+v8NpoI+TuuBO5Cdol9+7VPhdmLEH6sZIo=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-8ijGO8up0qVQ/kVX5/DveKyovYLh7jm+d7vooS1waAA=";
|
||||
cargoSha256 = "sha256-C5MCT4EG/lI4s2rVGSm9DgBu43FKpp3iTBbCf7N1jOA=";
|
||||
|
||||
checkFlags = [
|
||||
# these want internet access, disable them
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
let
|
||||
pname = "ledger-live-desktop";
|
||||
version = "2.40.2";
|
||||
version = "2.40.4";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
|
||||
hash = "sha256-2L1iVPLCCIQ6qBqkg+GmiqMmknHmdDLUrysN8vcW2YQ=";
|
||||
hash = "sha256-ktmGXEWoCrhx9hGau2VkQi0GMa53EqHV1wGtUk6kicc=";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
|
|
|
@ -10,19 +10,23 @@
|
|||
, zlib
|
||||
, protobuf
|
||||
}:
|
||||
let
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
version = pinData.version;
|
||||
sha256 = pinData.sha256;
|
||||
cargoSha256 = pinData.cargoSha256;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "solana-testnet-cli";
|
||||
version = "1.9.2";
|
||||
inherit version cargoSha256;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "solana-labs";
|
||||
repo = "solana";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-wrv35vBohLztMZPb6gfZdCaXcjj/Y7vnQqINaI6dBM4=";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-A5uVa+cRmrkVyw7MFH4QAr0VIFi18wcc2VPFvQyT9EM=";
|
||||
|
||||
buildAndTestSubdir = "cli";
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [ protobuf pkg-config ];
|
||||
|
@ -53,4 +57,5 @@ rustPlatform.buildRustPackage rec {
|
|||
maintainers = with maintainers; [ happysalada ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
passthru.updateScript = ./update.sh;
|
||||
}
|
||||
|
|
5
pkgs/applications/blockchains/solana/pin.json
Normal file
5
pkgs/applications/blockchains/solana/pin.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"version": "1.10.9",
|
||||
"sha256": "sha256-y7+ogMJ5E9E/+ZaTCHWOQWG7iR+BGuVqvlNUDT++Ghc=",
|
||||
"cargoSha256": "sha256-7EULmmztt+INvSdluvvX5xbE2hWKAmHiW0MEYIPNPw4="
|
||||
}
|
33
pkgs/applications/blockchains/solana/update.sh
Executable file
33
pkgs/applications/blockchains/solana/update.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i oil -p jq sd nix-prefetch-github ripgrep
|
||||
|
||||
# TODO set to `verbose` or `extdebug` once implemented in oil
|
||||
shopt --set xtrace
|
||||
# we need failures inside of command subs to get the correct cargoSha256
|
||||
shopt --unset inherit_errexit
|
||||
|
||||
const directory = $(dirname $0 | xargs realpath)
|
||||
const owner = "solana-labs"
|
||||
const repo = "solana"
|
||||
const latest_rev = $(curl -q https://api.github.com/repos/${owner}/${repo}/releases/latest | \
|
||||
jq -r '.tag_name')
|
||||
const latest_version = $(echo $latest_rev | sd 'v' '')
|
||||
const current_version = $(jq -r '.version' $directory/pin.json)
|
||||
if ("$latest_version" === "$current_version") {
|
||||
echo "solana is already up-to-date"
|
||||
return 0
|
||||
} else {
|
||||
const tarball_meta = $(nix-prefetch-github $owner $repo --rev "$latest_rev")
|
||||
const tarball_hash = "sha256-$(echo $tarball_meta | jq -r '.sha256')"
|
||||
|
||||
jq ".version = \"$latest_version\" | \
|
||||
.\"sha256\" = \"$tarball_hash\" | \
|
||||
.\"cargoSha256\" = \"\"" $directory/pin.json | sponge $directory/pin.json
|
||||
|
||||
const new_cargo_sha256 = $(nix-build -A solana-testnet 2>&1 | \
|
||||
tail -n 2 | \
|
||||
head -n 1 | \
|
||||
sd '\s+got:\s+' '')
|
||||
|
||||
jq ".cargoSha256 = \"$new_cargo_sha256\"" $directory/pin.json | sponge $directory/pin.json
|
||||
}
|
|
@ -216,9 +216,9 @@ in runCommand
|
|||
# source-code itself).
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; rec {
|
||||
stable = [ fabianhjr ];
|
||||
beta = [ fabianhjr ];
|
||||
canary = [ fabianhjr ];
|
||||
stable = [ ];
|
||||
beta = [ ];
|
||||
canary = [ ];
|
||||
dev = canary;
|
||||
}."${channel}";
|
||||
};
|
||||
|
|
|
@ -9,16 +9,16 @@ let
|
|||
inherit buildFHSUserEnv;
|
||||
};
|
||||
stableVersion = {
|
||||
version = "2021.1.1.21"; # "Android Studio Bumblebee (2021.1.1 Patch 1)"
|
||||
sha256Hash = "PeMJIILfaunTlpR4EV76qQlTlZDcWoKes61qe9W9oqQ=";
|
||||
version = "2021.1.1.23"; # "Android Studio Bumblebee (2021.1.1 Patch 3)"
|
||||
sha256Hash = "1kxb19qf7bs5lyfgr8vamakp1nf2wlxlwwni1kihza67ib6hcxdk";
|
||||
};
|
||||
betaVersion = {
|
||||
version = "2021.2.1.8"; # "Android Studio Chipmunk (2021.2.1) Beta 1"
|
||||
sha256Hash = "bPfs4kw7czG9CbEgrzn0bQXdT03jyqPVqtaIuVBFSmc=";
|
||||
version = "2021.2.1.11"; # "Android Studio Chipmunk (2021.2.1) Beta 4"
|
||||
sha256Hash = "0in8x6v957y9hsnz5ak845pdpvgvnvlm0s6r9y8f27zkm947vbjd";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "2021.3.1.1"; # "Android Studio Dolphin (2021.3.1) Canary 1"
|
||||
sha256Hash = "W3pNQBM7WdDScQo5b8q5Va5NTgl73uZu0ks/zDMb4aA=";
|
||||
version = "2021.3.1.7"; # "Android Studio Dolphin (2021.3.1) Canary 7"
|
||||
sha256Hash = "02jwy3q2ccs7l3snm8w40znzk54v2h1sljdr3d0yh7sy0qyn32k1";
|
||||
};
|
||||
in {
|
||||
# Attributes are named by their corresponding release channels
|
||||
|
|
|
@ -38,13 +38,13 @@ let
|
|||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cudatext";
|
||||
version = "1.162.0";
|
||||
version = "1.162.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Alexey-T";
|
||||
repo = "CudaText";
|
||||
rev = version;
|
||||
sha256 = "sha256-lAH0HXtzWs1iFVzM/tvnBT1s1Mt0AGs4TqdtFu1NeMw=";
|
||||
sha256 = "sha256-CQ0TPZH9A37WK+gm7jgCxL5eF+1SxHlsJTTzMVRkHIs=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
},
|
||||
"ATSynEdit": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.04.18",
|
||||
"sha256": "sha256-tvFESbamCt7A6Xv8WGh0dKzr9neelYMM7guySOunfvk="
|
||||
"rev": "2022.04.21",
|
||||
"sha256": "sha256-rPbQ3LNBXNHi9dgQKSaaCsuAY/VIzgq9tqlRXRl2IqU="
|
||||
},
|
||||
"ATSynEdit_Cmp": {
|
||||
"owner": "Alexey-T",
|
||||
|
@ -26,8 +26,8 @@
|
|||
},
|
||||
"EControl": {
|
||||
"owner": "Alexey-T",
|
||||
"rev": "2022.04.18",
|
||||
"sha256": "sha256-Wp+/f/z2H/WANq9u8mRDn0BaeyFWiPpLrW0YqyT+ezw="
|
||||
"rev": "2022.04.21",
|
||||
"sha256": "sha256-le6ulGFUNjeipYQKzVFezFb9u/0IcQcu5BMxFaIZdyw="
|
||||
},
|
||||
"ATSynEdit_Ex": {
|
||||
"owner": "Alexey-T",
|
||||
|
|
|
@ -5,23 +5,31 @@
|
|||
, plz
|
||||
, cl-lib
|
||||
, ts
|
||||
, magit-section
|
||||
, taxy-magit-section
|
||||
, taxy
|
||||
, svg-lib
|
||||
}:
|
||||
|
||||
trivialBuild {
|
||||
pname = "ement";
|
||||
version = "unstable-2021-10-08";
|
||||
version = "unstable-2022-04-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alphapapa";
|
||||
repo = "ement.el";
|
||||
rev = "c951737dc855604aba389166bb0e7366afadc533";
|
||||
sha256 = "00iwwz4hzg4g59wrb5df6snqz3ppvrsadhfp61w1pa8gvg2z9bvy";
|
||||
rev = "70da19e4c9210d362b1d6d9c17ab2c034a03250d";
|
||||
sha256 = "sha256-Pxul0WrtyH2XZzF0fOOitLc3x/kc+Qc11RDH0n+Hm04=";
|
||||
};
|
||||
|
||||
packageRequires = [
|
||||
plz
|
||||
cl-lib
|
||||
ts
|
||||
magit-section
|
||||
taxy-magit-section
|
||||
taxy
|
||||
svg-lib
|
||||
];
|
||||
|
||||
patches = [
|
||||
|
|
|
@ -233,6 +233,9 @@
|
|||
|
||||
sv-kalender = callPackage ./sv-kalender { };
|
||||
|
||||
tree-sitter-langs = callPackage ./tree-sitter-langs { final = self; };
|
||||
tsc = callPackage ./tsc { };
|
||||
|
||||
youtube-dl = callPackage ./youtube-dl { };
|
||||
|
||||
# From old emacsPackages (pre emacsPackagesNg)
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
"tree-sitter-agda",
|
||||
"tree-sitter-bash",
|
||||
"tree-sitter-c",
|
||||
"tree-sitter-c-sharp",
|
||||
"tree-sitter-cpp",
|
||||
"tree-sitter-css",
|
||||
"tree-sitter-elixir",
|
||||
"tree-sitter-elm",
|
||||
"tree-sitter-fluent",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-haskell",
|
||||
"tree-sitter-hcl",
|
||||
"tree-sitter-html",
|
||||
"tree-sitter-java",
|
||||
"tree-sitter-javascript",
|
||||
"tree-sitter-jsdoc",
|
||||
"tree-sitter-json",
|
||||
"tree-sitter-julia",
|
||||
"tree-sitter-nix",
|
||||
"tree-sitter-ocaml",
|
||||
"tree-sitter-php",
|
||||
"tree-sitter-prisma",
|
||||
"tree-sitter-python",
|
||||
"tree-sitter-ruby",
|
||||
"tree-sitter-rust",
|
||||
"tree-sitter-scala",
|
||||
"tree-sitter-swift",
|
||||
"tree-sitter-typescript",
|
||||
"tree-sitter-verilog",
|
||||
"tree-sitter-zig"
|
||||
]
|
|
@ -0,0 +1,44 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, symlinkJoin
|
||||
, fetchzip
|
||||
, melpaBuild
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, writeText
|
||||
, melpaStablePackages
|
||||
, runCommand
|
||||
, tree-sitter-grammars
|
||||
, plugins ? map (g: tree-sitter-grammars.${g}) (lib.importJSON ./default-grammars.json)
|
||||
, final
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (melpaStablePackages) tree-sitter-langs;
|
||||
|
||||
libSuffix = if stdenv.isDarwin then "dylib" else "so";
|
||||
soName = g: lib.removeSuffix "-grammar" (lib.removePrefix "tree-sitter-" g.pname) + "." + libSuffix;
|
||||
|
||||
grammarDir = runCommand "emacs-tree-sitter-grammars" {
|
||||
# Fake same version number as upstream language bundle to prevent triggering runtime downloads
|
||||
inherit (tree-sitter-langs) version;
|
||||
} (''
|
||||
install -d $out/langs/bin
|
||||
echo -n $version > $out/langs/bin/BUNDLE-VERSION
|
||||
'' + lib.concatStringsSep "\n" (map (
|
||||
g: "ln -s ${g}/parser $out/langs/bin/${soName g}") plugins
|
||||
));
|
||||
|
||||
in
|
||||
melpaStablePackages.tree-sitter-langs.overrideAttrs(old: {
|
||||
postPatch = old.postPatch or "" + ''
|
||||
substituteInPlace ./tree-sitter-langs-build.el \
|
||||
--replace "tree-sitter-langs-grammar-dir tree-sitter-langs--dir" "tree-sitter-langs-grammar-dir \"${grammarDir}/langs\""
|
||||
'';
|
||||
|
||||
passthru = old.passthru or {} // {
|
||||
inherit plugins;
|
||||
withPlugins = fn: final.tree-sitter-langs.override { plugins = fn tree-sitter-grammars; };
|
||||
};
|
||||
|
||||
})
|
|
@ -0,0 +1,74 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell ../../../../../../. -i python3 -p python3 -p nix
|
||||
from os.path import (
|
||||
dirname,
|
||||
abspath,
|
||||
join,
|
||||
)
|
||||
from typing import (
|
||||
List,
|
||||
Any,
|
||||
)
|
||||
import subprocess
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def fmt_grammar(grammar: str) -> str:
|
||||
return "tree-sitter-" + grammar
|
||||
|
||||
|
||||
def eval_expr(nixpkgs: str, expr: str) -> Any:
|
||||
p = subprocess.run(
|
||||
[
|
||||
"nix-instantiate",
|
||||
"--json",
|
||||
"--eval",
|
||||
"--expr",
|
||||
("with import %s {}; %s" % (nixpkgs, expr)),
|
||||
],
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
return json.loads(p.stdout)
|
||||
|
||||
|
||||
def check_grammar_exists(nixpkgs: str, grammar: str) -> bool:
|
||||
return eval_expr(
|
||||
nixpkgs, f'lib.hasAttr "{fmt_grammar(grammar)}" tree-sitter-grammars'
|
||||
)
|
||||
|
||||
|
||||
def build_attr(nixpkgs, attr: str) -> str:
|
||||
return (
|
||||
subprocess.run(
|
||||
["nix-build", "--no-out-link", nixpkgs, "-A", attr],
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
.stdout.decode()
|
||||
.strip()
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cwd = dirname(abspath(__file__))
|
||||
nixpkgs = abspath(join(cwd, "../../../../../.."))
|
||||
|
||||
src_dir = build_attr(nixpkgs, "emacs.pkgs.tree-sitter-langs.src")
|
||||
|
||||
existing: List[str] = []
|
||||
|
||||
grammars = os.listdir(join(src_dir, "repos"))
|
||||
for g in grammars:
|
||||
exists = check_grammar_exists(nixpkgs, g)
|
||||
if exists:
|
||||
existing.append(fmt_grammar(g))
|
||||
else:
|
||||
sys.stderr.write("Missing grammar: " + fmt_grammar(g) + "\n")
|
||||
sys.stderr.flush()
|
||||
|
||||
with open(join(cwd, "default-grammars.json"), mode="w") as f:
|
||||
json.dump(sorted(existing), f, indent=2)
|
||||
f.write("\n")
|
|
@ -0,0 +1,89 @@
|
|||
{ lib
|
||||
, symlinkJoin
|
||||
, melpaBuild
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, writeText
|
||||
, clang
|
||||
, llvmPackages
|
||||
|
||||
, runtimeShell
|
||||
, writeScript
|
||||
, python3
|
||||
, nix-prefetch-github
|
||||
, nix
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
srcMeta = lib.importJSON ./src.json;
|
||||
inherit (srcMeta) version;
|
||||
|
||||
src = fetchFromGitHub srcMeta.src;
|
||||
|
||||
tsc = melpaBuild {
|
||||
inherit src;
|
||||
inherit version;
|
||||
|
||||
pname = "tsc";
|
||||
commit = version;
|
||||
|
||||
sourceRoot = "source/core";
|
||||
|
||||
recipe = writeText "recipe" ''
|
||||
(tsc
|
||||
:repo "emacs-tree-sitter/elisp-tree-sitter"
|
||||
:fetcher github)
|
||||
'';
|
||||
};
|
||||
|
||||
tsc-dyn = rustPlatform.buildRustPackage {
|
||||
inherit version;
|
||||
inherit src;
|
||||
|
||||
pname = "tsc-dyn";
|
||||
|
||||
nativeBuildInputs = [ clang ];
|
||||
sourceRoot = "source/core";
|
||||
|
||||
configurePhase = ''
|
||||
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
LIB=($out/lib/libtsc_dyn.*)
|
||||
TSC_PATH=$out/share/emacs/site-lisp/elpa/tsc-${version}
|
||||
install -d $TSC_PATH
|
||||
install -m444 $out/lib/libtsc_dyn.* $TSC_PATH/''${LIB/*libtsc_/tsc-}
|
||||
echo -n $version > $TSC_PATH/DYN-VERSION
|
||||
rm -r $out/lib
|
||||
'';
|
||||
|
||||
inherit (srcMeta) cargoSha256;
|
||||
};
|
||||
|
||||
in symlinkJoin {
|
||||
name = "tsc-${version}";
|
||||
paths = [ tsc tsc-dyn ];
|
||||
|
||||
passthru = {
|
||||
updateScript = let
|
||||
pythonEnv = python3.withPackages(ps: [ ps.requests ]);
|
||||
in writeScript "tsc-update" ''
|
||||
#!${runtimeShell}
|
||||
set -euo pipefail
|
||||
export PATH=${lib.makeBinPath [
|
||||
nix-prefetch-github
|
||||
nix
|
||||
pythonEnv
|
||||
]}:$PATH
|
||||
exec python3 ${builtins.toString ./update.py} ${builtins.toString ./.}
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "The core APIs of the Emacs binding for tree-sitter.";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ pimeys ];
|
||||
};
|
||||
}
|
10
pkgs/applications/editors/emacs/elisp-packages/tsc/src.json
Normal file
10
pkgs/applications/editors/emacs/elisp-packages/tsc/src.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"src": {
|
||||
"owner": "emacs-tree-sitter",
|
||||
"repo": "elisp-tree-sitter",
|
||||
"rev": "909717c685ff5a2327fa2ca8fb8a25216129361c",
|
||||
"sha256": "LrakDpP3ZhRQqz47dPcyoQnu5lROdaNlxGaQfQT6u+k="
|
||||
},
|
||||
"version": "0.18.0",
|
||||
"cargoSha256": "sha256-IRCZqszBkGF8anF/kpcPOzHdOP4lAtJBAp6FS5tAOx8="
|
||||
}
|
122
pkgs/applications/editors/emacs/elisp-packages/tsc/update.py
Normal file
122
pkgs/applications/editors/emacs/elisp-packages/tsc/update.py
Normal file
|
@ -0,0 +1,122 @@
|
|||
#!/usr/bin/env python3
|
||||
from textwrap import dedent
|
||||
from os.path import (
|
||||
abspath,
|
||||
dirname,
|
||||
join,
|
||||
)
|
||||
from typing import (
|
||||
Dict,
|
||||
Any,
|
||||
)
|
||||
import subprocess
|
||||
import tempfile
|
||||
import json
|
||||
import sys
|
||||
import re
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
def eval_drv(nixpkgs: str, expr: str) -> Any:
|
||||
expr = "\n".join(
|
||||
(
|
||||
"with (import %s {});" % nixpkgs,
|
||||
expr,
|
||||
)
|
||||
)
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w") as f:
|
||||
f.write(dedent(expr))
|
||||
f.flush()
|
||||
p = subprocess.run(
|
||||
["nix-instantiate", "--json", f.name], stdout=subprocess.PIPE, check=True
|
||||
)
|
||||
|
||||
return p.stdout.decode().strip()
|
||||
|
||||
|
||||
def get_src(tag_name: str) -> Dict[str, str]:
|
||||
p = subprocess.run(
|
||||
[
|
||||
"nix-prefetch-github",
|
||||
"--rev",
|
||||
tag_name,
|
||||
"--json",
|
||||
"emacs-tree-sitter",
|
||||
"elisp-tree-sitter",
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
check=True,
|
||||
)
|
||||
src = json.loads(p.stdout)
|
||||
|
||||
fields = ["owner", "repo", "rev", "sha256"]
|
||||
|
||||
return {f: src[f] for f in fields}
|
||||
|
||||
|
||||
def get_cargo_sha256(drv_path: str):
|
||||
# Note: No check=True since we expect this command to fail
|
||||
p = subprocess.run(["nix-store", "-r", drv_path], stderr=subprocess.PIPE)
|
||||
|
||||
stderr = p.stderr.decode()
|
||||
lines = iter(stderr.split("\n"))
|
||||
|
||||
for l in lines:
|
||||
if l.startswith("error: hash mismatch in fixed-output derivation"):
|
||||
break
|
||||
else:
|
||||
raise ValueError("Did not find expected hash mismatch message")
|
||||
|
||||
for l in lines:
|
||||
m = re.match(r"\s+got:\s+(.+)$", l)
|
||||
if m:
|
||||
return m.group(1)
|
||||
|
||||
raise ValueError("Could not extract actual sha256 hash: ", stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cwd = sys.argv[1]
|
||||
|
||||
nixpkgs = abspath(join(cwd, "../../../../../.."))
|
||||
|
||||
tag_name = requests.get(
|
||||
"https://api.github.com/repos/emacs-tree-sitter/elisp-tree-sitter/releases/latest"
|
||||
).json()["tag_name"]
|
||||
|
||||
src = get_src(tag_name)
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w") as f:
|
||||
json.dump(src, f)
|
||||
f.flush()
|
||||
|
||||
drv_path = eval_drv(
|
||||
nixpkgs,
|
||||
"""
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "tsc-dyn";
|
||||
version = "%s";
|
||||
nativeBuildInputs = [ clang ];
|
||||
src = fetchFromGitHub (lib.importJSON %s);
|
||||
sourceRoot = "source/core";
|
||||
cargoSha256 = lib.fakeSha256;
|
||||
}
|
||||
"""
|
||||
% (tag_name, f.name),
|
||||
)
|
||||
|
||||
cargo_sha256 = get_cargo_sha256(drv_path)
|
||||
|
||||
with open(join(cwd, "src.json"), mode="w") as f:
|
||||
json.dump(
|
||||
{
|
||||
"src": src,
|
||||
"version": tag_name,
|
||||
"cargoSha256": cargo_sha256,
|
||||
},
|
||||
f,
|
||||
indent=2,
|
||||
)
|
||||
f.write("\n")
|
10
pkgs/applications/editors/emacs/elisp-packages/update
Executable file
10
pkgs/applications/editors/emacs/elisp-packages/update
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
./update-from-overlay
|
||||
|
||||
./update-manual
|
||||
git commit -m "emacs.pkgs.manualPackages: $(date --iso)" -- .
|
7
pkgs/applications/editors/emacs/elisp-packages/update-manual
Executable file
7
pkgs/applications/editors/emacs/elisp-packages/update-manual
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
nix-build --no-out-link update-manual.nix | xargs -n 1 -P $(nproc) bash -c
|
|
@ -0,0 +1,11 @@
|
|||
let
|
||||
pkgs = import ../../../../../. {
|
||||
config.allowBroken = true;
|
||||
};
|
||||
inherit (pkgs) lib emacs;
|
||||
inherit (lib) isDerivation hasAttr filterAttrs mapAttrs attrValues;
|
||||
|
||||
# Extract updateScript's from manually package emacs packages
|
||||
hasScript = filterAttrs (_: v: isDerivation v && hasAttr "updateScript" v) emacs.pkgs.manualPackages;
|
||||
|
||||
in attrValues (mapAttrs (_: v: v.updateScript) hasScript)
|
|
@ -5,7 +5,6 @@
|
|||
, appstream-glib
|
||||
, desktop-file-utils
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, flatpak
|
||||
, gnome
|
||||
, libgit2-glib
|
||||
|
@ -41,23 +40,15 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnome-builder";
|
||||
version = "42.0";
|
||||
version = "42.1";
|
||||
|
||||
outputs = [ "out" "devdoc" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "Uu/SltaLL/GCNBwEgdz9cGVMQIvbZ5/Ot225cDwiQo8=";
|
||||
sha256 = "XU1RtwKGW0gBcgHwxgfiSifXIDGo9ciNT86HW1VFZwo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix appstream validation
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/gnome-builder/-/commit/d7151679e0c925d27216256dc32fe67fb298d059.patch";
|
||||
sha256 = "vdNJawkqSBaFGRZvxzvjOryQpBL4jcN7tr1t3ihD7LA=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
appstream-glib
|
||||
desktop-file-utils
|
||||
|
@ -115,8 +106,6 @@ stdenv.mkDerivation rec {
|
|||
"-Dnetwork_tests=false"
|
||||
];
|
||||
|
||||
# Some tests fail due to being unable to find the Vte typelib, and I don't
|
||||
# understand why. Somebody should look into fixing this.
|
||||
doCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-qnb0yB/NNJV257dsLmP84brajoRG03U+Ja1ACYbBvbE=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
substituteInPlace configure --replace "./conftest" "echo"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = [ "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config" ];
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
msgpack (1.4.2)
|
||||
msgpack (1.5.1)
|
||||
multi_json (1.15.0)
|
||||
neovim (0.8.1)
|
||||
neovim (0.9.0)
|
||||
msgpack (~> 1.1)
|
||||
multi_json (~> 1.0)
|
||||
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "06iajjyhx0rvpn4yr3h1hc4w4w3k59bdmfhxnjzzh76wsrdxxrc6";
|
||||
sha256 = "sha256-fPWiGi0w4OFlMZOIf3gd21jyeYhg5t/VdLz7kK9fD8Q=";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.4.2";
|
||||
version = "1.5.1";
|
||||
};
|
||||
multi_json = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0pb1g1y3dsiahavspyzkdy39j4q377009f6ix0bh1ag4nqw43l0z";
|
||||
sha256 = "sha256-H9BBOLbkqQAX6NG4BMA5AxOZhm/z+6u3girqNnx4YV0=";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.15.0";
|
||||
|
@ -25,9 +25,9 @@
|
|||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0lfrbi4r6lagn2q92lyivk2w22i2spw0jbdzxxlcfj2zhv2wnvvi";
|
||||
sha256 = "sha256-hRI43XGHGeqxMvpFjp0o79GGReiLXTkhwh5LYq6AQL4=";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.8.1";
|
||||
version = "0.9.0";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,6 +14,15 @@ stdenv.mkDerivation rec {
|
|||
hash = "sha256-Z8B1RIFve3UPj+9G/WJX0BNc2ynG/qtoGfoesarYGz8=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
substituteInPlace configure --replace "./conftest" "echo"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -m755 -Dt $out/bin ed
|
||||
install -m644 -Dt $out/share/man/man1 ed.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/ibara/oed";
|
||||
description = "Portable ed editor from OpenBSD";
|
||||
|
|
|
@ -154,7 +154,7 @@ in
|
|||
hunspellDictionaries = with lib; filter isDerivation (unique (attrValues hunspellDicts));
|
||||
# These dicts contain identically-named dict files, so we only keep the
|
||||
# -large versions in case of clashes
|
||||
largeDicts = with lib; filter (d: hasInfix "-large-wordlist" d) hunspellDictionaries;
|
||||
largeDicts = with lib; filter (d: hasInfix "-large-wordlist" d.name) hunspellDictionaries;
|
||||
otherDicts = with lib; filter
|
||||
(d: !(hasAttr "dictFileName" d &&
|
||||
elem d.dictFileName (map (d: d.dictFileName) largeDicts)))
|
||||
|
|
|
@ -10629,6 +10629,18 @@ final: prev:
|
|||
meta.homepage = "https://github.com/tpope/vim-scriptease/";
|
||||
};
|
||||
|
||||
vim-search-pulse = buildVimPluginFrom2Nix {
|
||||
pname = "vim-search-pulse";
|
||||
version = "2017-01-05";
|
||||
src = fetchFromGitHub {
|
||||
owner = "inside";
|
||||
repo = "vim-search-pulse";
|
||||
rev = "9f8f473e3813bd76ecb66e8d6182d96bda39b6df";
|
||||
sha256 = "1xr90a8wvjfkgw1yrh0zcvpvp9ma6z0wqkl8v8pabf20vckgy2q0";
|
||||
};
|
||||
meta.homepage = "https://github.com/inside/vim-search-pulse/";
|
||||
};
|
||||
|
||||
vim-sensible = buildVimPluginFrom2Nix {
|
||||
pname = "vim-sensible";
|
||||
version = "2022-04-11";
|
||||
|
|
|
@ -891,6 +891,7 @@ https://github.com/mhinz/vim-sayonara/,7e774f58c5865d9c10d40396850b35ab95af17c5,
|
|||
https://github.com/derekwyatt/vim-scala/,,
|
||||
https://github.com/thinca/vim-scouter/,,
|
||||
https://github.com/tpope/vim-scriptease/,,
|
||||
https://github.com/inside/vim-search-pulse/,,
|
||||
https://github.com/tpope/vim-sensible/,,
|
||||
https://github.com/guns/vim-sexp/,,
|
||||
https://github.com/tpope/vim-sexp-mappings-for-regular-people/,,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake
|
||||
, wrapQtAppsHook, qtbase, bluez, ffmpeg, libao, libGLU, libGL, pcre, gettext
|
||||
, libXrandr, libusb1, lzo, libpthreadstubs, libXext, libXxf86vm, libXinerama
|
||||
, libXrandr, libusb1, libpthreadstubs, libXext, libXxf86vm, libXinerama
|
||||
, libSM, libXdmcp, readline, openal, udev, libevdev, portaudio, curl, alsa-lib
|
||||
, miniupnpc, enet, mbedtls, soundtouch, sfml, writeScript
|
||||
, miniupnpc, enet, mbedtls, soundtouch, sfml, xz, writeScript
|
||||
, vulkan-loader ? null, libpulseaudio ? null
|
||||
|
||||
# - Inputs used for Darwin
|
||||
|
@ -25,8 +25,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [
|
||||
curl ffmpeg libao libGLU libGL pcre gettext libpthreadstubs libpulseaudio
|
||||
libXrandr libXext libXxf86vm libXinerama libSM readline openal libXdmcp lzo
|
||||
portaudio libusb1 libpng hidapi miniupnpc enet mbedtls soundtouch sfml
|
||||
libXrandr libXext libXxf86vm libXinerama libSM readline openal libXdmcp
|
||||
portaudio libusb1 libpng hidapi miniupnpc enet mbedtls soundtouch sfml xz
|
||||
qtbase
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
bluez udev libevdev alsa-lib vulkan-loader
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
, gettext
|
||||
, libXrandr
|
||||
, libusb1
|
||||
, lzo
|
||||
, libpthreadstubs
|
||||
, libXext
|
||||
, libXxf86vm
|
||||
|
@ -34,6 +33,7 @@
|
|||
, soundtouch
|
||||
, sfml
|
||||
, fmt
|
||||
, xz
|
||||
, vulkan-loader
|
||||
, libpulseaudio
|
||||
|
||||
|
@ -81,7 +81,6 @@ stdenv.mkDerivation rec {
|
|||
readline
|
||||
openal
|
||||
libXdmcp
|
||||
lzo
|
||||
portaudio
|
||||
libusb1
|
||||
libpng
|
||||
|
@ -92,6 +91,7 @@ stdenv.mkDerivation rec {
|
|||
soundtouch
|
||||
sfml
|
||||
fmt
|
||||
xz
|
||||
qtbase
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
bluez
|
||||
|
|
|
@ -56,7 +56,7 @@ let
|
|||
, stdenvOverride ? stdenv
|
||||
, src ? (getCoreSrc core)
|
||||
, broken ? false
|
||||
, version ? "unstable-2022-04-08"
|
||||
, version ? "unstable-2022-04-21"
|
||||
, platforms ? retroarch.meta.platforms
|
||||
# The resulting core file is based on core name
|
||||
# Setting `normalizeCore` to `true` will convert `-` to `_` on the core filename
|
||||
|
@ -359,6 +359,7 @@ in
|
|||
core = "dosbox";
|
||||
description = "Port of DOSBox to libretro";
|
||||
license = lib.licenses.gpl2Only;
|
||||
stdenvOverride = gcc10Stdenv;
|
||||
};
|
||||
|
||||
eightyone = mkLibRetroCore {
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
}:
|
||||
|
||||
let
|
||||
version = "1.10.2";
|
||||
version = "1.10.3";
|
||||
libretroCoreInfo = fetchFromGitHub {
|
||||
owner = "libretro";
|
||||
repo = "libretro-core-info";
|
||||
sha256 = "sha256-XOSIVH3BSwAFKUeRvyYc2OXDa+TLjoKVGl+b8fgnvtY=";
|
||||
sha256 = "sha256-wIIMEWrria8bZe/rcoJwDA9aCMWwbkDQFyEU80TZXFQ=";
|
||||
rev = "v${version}";
|
||||
};
|
||||
runtimeLibs = lib.optional withVulkan vulkan-loader
|
||||
|
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
|||
src = fetchFromGitHub {
|
||||
owner = "libretro";
|
||||
repo = "RetroArch";
|
||||
sha256 = "sha256-fMsHMQiEoXeFKITxeEyRH829z5SCf8p0Hxq6ww1p3z4=";
|
||||
sha256 = "sha256-nAv1yv0laqlOmB8UUkK5wSYy/ySqXloEErm+yV30bbA=";
|
||||
rev = "v${version}";
|
||||
};
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
"beetle-ngp": {
|
||||
"owner": "libretro",
|
||||
"repo": "beetle-ngp-libretro",
|
||||
"rev": "6abc74d9dc6a86460ab71c93c153fe1cb8ef4dbb",
|
||||
"sha256": "+p3MwlzwwTghIKTDMzkqGlxhZiy/Px7xaDK3a0JagUE="
|
||||
"rev": "facf8e1f5440c5d289258ee3c483710f3bf916fb",
|
||||
"sha256": "vDKDt7MvCB9XQYP291cwcEPDxfNIVgNSWtBYz9PVgcw="
|
||||
},
|
||||
"beetle-pce-fast": {
|
||||
"owner": "libretro",
|
||||
|
@ -32,20 +32,20 @@
|
|||
"beetle-pcfx": {
|
||||
"owner": "libretro",
|
||||
"repo": "beetle-pcfx-libretro",
|
||||
"rev": "00abc26cafb15cc33dcd73f4bd6b93cbaab6e1ea",
|
||||
"sha256": "4a1wV3WKZmg1ed3BD0PN0Ap9E9XahQtilRWTGV5Ns3g="
|
||||
"rev": "bfc0954e14b261a04dcf8dbe0df8798f16ae3f3c",
|
||||
"sha256": "XzCb1lZFYgsg+3eQ1OqyycNxCgLtZFA30rno3ytdnoM="
|
||||
},
|
||||
"beetle-psx": {
|
||||
"owner": "libretro",
|
||||
"repo": "beetle-psx-libretro",
|
||||
"rev": "88929ae90b4807a41b1b240377ab440e39ecf2cc",
|
||||
"sha256": "5AX5FPsmsqGWCNzLgJ7lsekZaIdano2j5sb4qUkD4cQ="
|
||||
"rev": "5a24d54d30dd00d817d267cf92fd5b3f4640928f",
|
||||
"sha256": "uG1BhElNW75PnfM+rEYfbl97iwRT89hnl84yvlgx6fg="
|
||||
},
|
||||
"beetle-saturn": {
|
||||
"owner": "libretro",
|
||||
"repo": "beetle-saturn-libretro",
|
||||
"rev": "ae30f29e340a00b33e38df85ceaa599151a47cd7",
|
||||
"sha256": "nc239PRM/TfkZMWm4Zl5kSoZBQcrMcMudupvCJtTBlc="
|
||||
"rev": "dd18f9c477106263b3b7b050f4970d331ff7b23a",
|
||||
"sha256": "RN5dmORtNOjIklSz/n11lz37bZ4IcPD7cyRcBGS4Oi8="
|
||||
},
|
||||
"beetle-snes": {
|
||||
"owner": "libretro",
|
||||
|
@ -62,14 +62,14 @@
|
|||
"beetle-vb": {
|
||||
"owner": "libretro",
|
||||
"repo": "beetle-vb-libretro",
|
||||
"rev": "a91437af0879124aa00b6cb30ca1189f2c84b7cb",
|
||||
"sha256": "ryahr/g6PDvUKCPkF1D8xozNGNCa4bLw63b5Ra9Vsfo="
|
||||
"rev": "246555f8ed7e0b9e5748b2ee2ed6743187c61393",
|
||||
"sha256": "96lQlDqx2bvFeovqGGkemxqS2zlHw92O6YeTEGlgf34="
|
||||
},
|
||||
"beetle-wswan": {
|
||||
"owner": "libretro",
|
||||
"repo": "beetle-wswan-libretro",
|
||||
"rev": "089a62477c5f51ac746a5fc8eacf3599e9feb649",
|
||||
"sha256": "yaaEJ+XgrBgtTEkffgnxvt2mrp5dsDYJ+TTxCZZU5OE="
|
||||
"rev": "d1fb3f399a2bc16b9ad0f2e8c8ba9f7051cd26bd",
|
||||
"sha256": "p9mJv7zBFjNh1sh5iAjBZzxP6k8ydUNDXLQIjHl9doQ="
|
||||
},
|
||||
"blastem": {
|
||||
"owner": "libretro",
|
||||
|
@ -135,8 +135,8 @@
|
|||
"eightyone": {
|
||||
"owner": "libretro",
|
||||
"repo": "81-libretro",
|
||||
"rev": "6aba19246c1ec08f3de5659b2dbc3277ec6bfb97",
|
||||
"sha256": "2G6NkNlvqvP5RM35ydppnr2/RRbeiIpM2HKOpt8PkgU="
|
||||
"rev": "2e34567a320cba27b9162b1776db4de3cdb7cf03",
|
||||
"sha256": "vjrHRLzc9Fy0MwV9d+LlcJTGJfVsRauEig8R+erBtfw="
|
||||
},
|
||||
"fbalpha2012": {
|
||||
"owner": "libretro",
|
||||
|
@ -147,8 +147,8 @@
|
|||
"fbneo": {
|
||||
"owner": "libretro",
|
||||
"repo": "fbneo",
|
||||
"rev": "01bf2e189dcd96f978c3a4ae7bbbb00f2d90aabf",
|
||||
"sha256": "naCfGSrwA9vO3Cu2rHLplCMcTbpx6S/sapwisFCcL5c="
|
||||
"rev": "e4625a196b9232ba93a156e3a5164aa11193f20a",
|
||||
"sha256": "/5JmwuLWWBQWXnqCMjKzOC2XG6wo5a6xgQOYX1P1zcw="
|
||||
},
|
||||
"fceumm": {
|
||||
"owner": "libretro",
|
||||
|
@ -165,8 +165,8 @@
|
|||
"fmsx": {
|
||||
"owner": "libretro",
|
||||
"repo": "fmsx-libretro",
|
||||
"rev": "f9ea9eacd49297783c216d147dcc1a22465b2749",
|
||||
"sha256": "nDsaaUeZUm4zTj07+2nPDefoDpw18vXdhQr1BH6/4eY="
|
||||
"rev": "11fa9f3c08cde567394c41320ca76798c2c64670",
|
||||
"sha256": "1u5c5oDIjjXEquh6UBv2H1F/Ln7h44DTF1ohDG0Qnww="
|
||||
},
|
||||
"freeintv": {
|
||||
"owner": "libretro",
|
||||
|
@ -183,26 +183,26 @@
|
|||
"genesis-plus-gx": {
|
||||
"owner": "libretro",
|
||||
"repo": "Genesis-Plus-GX",
|
||||
"rev": "144045b30a18ab4b27c3ae46490274988f302748",
|
||||
"sha256": "ydnyPdkJmM+xhuJqIOxZISFcTN8RFgOLbnRvOBJORek="
|
||||
"rev": "7520ac8aae7b08262c0472e724e6ef0bfe41d285",
|
||||
"sha256": "wKcO/dulgZKgXTuHdcQvfSrfxSI5UA0az6qMLtP4K6g="
|
||||
},
|
||||
"gpsp": {
|
||||
"owner": "libretro",
|
||||
"repo": "gpsp",
|
||||
"rev": "d4547baf26dd70a18eeb38d231ce3f998004ec30",
|
||||
"sha256": "9XU9TmBpuZeAOzqxuKVQZvdHRgX8fm4HcEfleM3jB7E="
|
||||
"rev": "f0f0b31f9ab95946965b75fed8d31e19290f3d43",
|
||||
"sha256": "aiegBSpQDyXzVkyWuUpI66QvA1tqS8PQ8+75U89K10A="
|
||||
},
|
||||
"gw": {
|
||||
"owner": "libretro",
|
||||
"repo": "gw-libretro",
|
||||
"rev": "85bf5c936044db0bf4138e7eb8ab20d3a7330035",
|
||||
"sha256": "yCAnveQw+VyZFQ/GsUBuyoMRQ4yfhA0f3tYghZ2HecU="
|
||||
"rev": "d08a08154ce8ed8e9de80582c108f157e4c6b226",
|
||||
"sha256": "PWd/r4BBmhiNqJdV6OaXHr4XCdR1GyVipq3zvyBcqEs="
|
||||
},
|
||||
"handy": {
|
||||
"owner": "libretro",
|
||||
"repo": "libretro-handy",
|
||||
"rev": "5145f79bb746f6d9c0b340c2f9cc4bf059848924",
|
||||
"sha256": "madTjJWKM8elM35LRAwm0RwnA44skLtIK2/7RXPSNl0="
|
||||
"rev": "517bb2d02909271836604c01c8f09a79ad605297",
|
||||
"sha256": "Igf/OvmnCzoWjCZBoep7T0pXsoBKq3NJpXlYhE7nr3s="
|
||||
},
|
||||
"hatari": {
|
||||
"owner": "libretro",
|
||||
|
@ -213,14 +213,14 @@
|
|||
"mame": {
|
||||
"owner": "libretro",
|
||||
"repo": "mame",
|
||||
"rev": "2a0e4ea0e2362bb7dcf77216c9fcb48426cea1e8",
|
||||
"sha256": "imuHEwzDpI8jbdOeOhBBfzl4k74mDq/3SrKD8upzZmo="
|
||||
"rev": "b7dd999590717638ceade2e24d16d63147aa12ad",
|
||||
"sha256": "QgENNjykhO+WSxAb//J+R7QP3/rZnxqv7sarO4eBYuc="
|
||||
},
|
||||
"mame2000": {
|
||||
"owner": "libretro",
|
||||
"repo": "mame2000-libretro",
|
||||
"rev": "f35db3877f8a79a174dd3b2e37f4ebf39d71d5a4",
|
||||
"sha256": "JmtvxKWAYNk1SyV1YpFeLX49zzGqpUv6nqM82xU70OM="
|
||||
"rev": "dd9d6612c29bf5b29bc2f94cab2d43fe3dcd69ee",
|
||||
"sha256": "X0fP0bNBk2hqXVdRspylLIjZO563aMXkyX4qgx/3Vr8="
|
||||
},
|
||||
"mame2003": {
|
||||
"owner": "libretro",
|
||||
|
@ -267,8 +267,8 @@
|
|||
"mesen-s": {
|
||||
"owner": "libretro",
|
||||
"repo": "mesen-s",
|
||||
"rev": "3694c7f9692a0be32d86979c347884ae9def0a3b",
|
||||
"sha256": "VBNl4682e2X12WNjtXZ3P4/Kw4OeRLSRWyZqYDpfmCo="
|
||||
"rev": "b0b53409eecb696fb13f411ffde72e8f576feb09",
|
||||
"sha256": "lDHyeIsVsI5+ZK8EJI50alrFuu0uJmxscda5bR1UmQQ="
|
||||
},
|
||||
"meteor": {
|
||||
"owner": "libretro",
|
||||
|
@ -297,8 +297,8 @@
|
|||
"nestopia": {
|
||||
"owner": "libretro",
|
||||
"repo": "nestopia",
|
||||
"rev": "7dbd5c6384c4c6326004c97fd8e6fa07cb4edcef",
|
||||
"sha256": "OBkWP36BzwsEW+ORF2opHlXwXHgGN0l2ZxBuyDO/sKY="
|
||||
"rev": "a9e197f2583ef4f36e9e77d930a677e63a2c2f62",
|
||||
"sha256": "QqmWSk8Ejf7QMJk0cVBgpnyqcK6oLjCnnXMXInuWfYc="
|
||||
},
|
||||
"np2kai": {
|
||||
"owner": "AZO234",
|
||||
|
@ -310,8 +310,8 @@
|
|||
"o2em": {
|
||||
"owner": "libretro",
|
||||
"repo": "libretro-o2em",
|
||||
"rev": "efd749cec2dd1ce42a8aa3048a89f817d271d804",
|
||||
"sha256": "aw0bJyQzYFOlQQOfNsRgqdeUJP1qF4llJxLq5t9oc5g="
|
||||
"rev": "641f06d67d192a0677ec861fcb731d3ce8da0f87",
|
||||
"sha256": "s3FreOziXeGhUyQdSoOywZldD21m3+OXK0EJ2Z8rXiY="
|
||||
},
|
||||
"opera": {
|
||||
"owner": "libretro",
|
||||
|
@ -334,28 +334,28 @@
|
|||
"pcsx_rearmed": {
|
||||
"owner": "libretro",
|
||||
"repo": "pcsx_rearmed",
|
||||
"rev": "37d9bf8315be570a350cd44876ae14f9b0eff20b",
|
||||
"sha256": "ieuEWs+NIQFCgMl/yTnaFdClxEv5NurrLuUvkjSUar0="
|
||||
"rev": "e24732050e902bd5402b2b7da7c391d2ca8fa799",
|
||||
"sha256": "tPz5E3QO6FucjYOzdjbY2FHLPz1Fmms10tdt7rZIW8U="
|
||||
},
|
||||
"picodrive": {
|
||||
"owner": "libretro",
|
||||
"repo": "picodrive",
|
||||
"rev": "bb6a52fe60e6f3bdcd17effe75e68fd0f8c44ba7",
|
||||
"sha256": "wztctLbK7VE4OPJS7ixKwnN4VkQv96Te3FmJlZ5m4A0=",
|
||||
"rev": "7ff457f2f833570013f2a7e2608ac40632e0735d",
|
||||
"sha256": "xEG5swvvWFhvosC1XpFaZphESNaf4AtX+6UE02B57j8=",
|
||||
"fetchSubmodules": true
|
||||
},
|
||||
"play": {
|
||||
"owner": "jpd002",
|
||||
"repo": "Play-",
|
||||
"rev": "ec2a9460ea2beeb69d30534ee8affbda4fc4b156",
|
||||
"sha256": "8maLaSJiF9soJdIlYoFHSG+2XXYTdLmWH6cq9vZRd/4=",
|
||||
"rev": "39eb5c2eb6da65dc76b1c4d1319175a68120a77a",
|
||||
"sha256": "EF3p0lvHjKGt4pxtTAkDM+uHsnW72lN+Ki8BaZIk/BQ=",
|
||||
"fetchSubmodules": true
|
||||
},
|
||||
"ppsspp": {
|
||||
"owner": "hrydgard",
|
||||
"repo": "ppsspp",
|
||||
"rev": "0eea0acf13022ff8d910adb55cec14ebad825afc",
|
||||
"sha256": "f1Tscndz0TcW0bUhixEvsrbFKefLfsCFjqWA7ANnfB4=",
|
||||
"rev": "83b8211abf7fb705835eb1ccf8feae04816ae96c",
|
||||
"sha256": "8K4bz/GUnE8GrlAVFULMXLC+i3ZYvR28EpehEg6up4s=",
|
||||
"fetchSubmodules": true
|
||||
},
|
||||
"prboom": {
|
||||
|
@ -391,20 +391,20 @@
|
|||
"smsplus-gx": {
|
||||
"owner": "libretro",
|
||||
"repo": "smsplus-gx",
|
||||
"rev": "8e8378896bc15c8a9f756339b596171ba266cc14",
|
||||
"sha256": "zvG2SF4zx3Yaaf54NZ2DgsGPN59msW8TvQFCS4OMcHQ="
|
||||
"rev": "9de9847dc8ba458e9522d5ae8b87bf71ad437257",
|
||||
"sha256": "XzqQ/3XH5L79UQep+DZ+mDHnUJKZQXzjNCZNZw2mGvY="
|
||||
},
|
||||
"snes9x": {
|
||||
"owner": "snes9xgit",
|
||||
"repo": "snes9x",
|
||||
"rev": "78d006ffdbb5cb6944177db52c3640152948d928",
|
||||
"sha256": "Qh+nLtwdLfjwYxXCv49pPPf0mqdxKRv/JLRm82knJu0="
|
||||
"rev": "3c729a9763263bc3a69f48370e43ae05e672970a",
|
||||
"sha256": "01M6Wvbu1omMwh3Xg4RGh028jirGs7mLpxwKJgMRQxA="
|
||||
},
|
||||
"snes9x2002": {
|
||||
"owner": "libretro",
|
||||
"repo": "snes9x2002",
|
||||
"rev": "25d9d4fea4c7d7fcc8608c65c2bec9bcbc41f26e",
|
||||
"sha256": "EYcaWckvTfi2ajx6C1olE5pW51diLSjMdqZdyH8U2Ck="
|
||||
"rev": "c4397de75a5f11403d154abd935e39fe969bca94",
|
||||
"sha256": "yL4SIRR1Er+7Iq3YPfoe5ES47nvyA3UmGK+upLzKiFA="
|
||||
},
|
||||
"snes9x2005": {
|
||||
"owner": "libretro",
|
||||
|
@ -415,26 +415,26 @@
|
|||
"snes9x2010": {
|
||||
"owner": "libretro",
|
||||
"repo": "snes9x2010",
|
||||
"rev": "b12f3ba46f09dd5d0254676ed4b9e289d16b9ea8",
|
||||
"sha256": "i4GEqZkgwlehuUQGcjLdMkO9xNWRs8k+3y2OGivwXCw="
|
||||
"rev": "c98224bc74aa0bbf355d128b22e4a2a4e94215b0",
|
||||
"sha256": "mf5msdwdcRRfFWHwmWLS/qKd7gNlLwexGEB6wB6TfhE="
|
||||
},
|
||||
"stella": {
|
||||
"owner": "stella-emu",
|
||||
"repo": "stella",
|
||||
"rev": "071e8f7eb1096dfe95d9eb2e5b7b27b30f28fbf9",
|
||||
"sha256": "8WzBL8ojsHYxOqItHeeG4djALhqBBOV7nHE078UzqAY="
|
||||
"rev": "efb2a9f299cad241e12d811580f28d75b6c3438d",
|
||||
"sha256": "QYwDTd8EZUMXJiuSJtoW8XQXgl+Wx0lPkNLOwzM5bzA="
|
||||
},
|
||||
"stella2014": {
|
||||
"owner": "libretro",
|
||||
"repo": "stella2014-libretro",
|
||||
"rev": "1a2e96bc6ccf91de6fb4322048da05f67a9d21d4",
|
||||
"sha256": "yINO6EU2kCldfxKcqym5ha3uIEQg7I6t4Wmu+8b6Hmw="
|
||||
"rev": "1351a4fe2ca6b1f3a66c7db0df2ec268ab002d41",
|
||||
"sha256": "/sVDOfP5CE8k808lhmH3tT47oZ1ka3pgDG5LglfPmHc="
|
||||
},
|
||||
"swanstation": {
|
||||
"owner": "libretro",
|
||||
"repo": "swanstation",
|
||||
"rev": "0932243b0e5f1a5a237b0521b30b39473b61fa31",
|
||||
"sha256": "krA7X9CIOg53giWSMXgzgazeyWFXEpMobPSnOB7g994="
|
||||
"rev": "0e53a5ac09a30d73d78b628f7e4954ebe5615801",
|
||||
"sha256": "vOu99fsm2oeSi96tWR+vV5suZSYCyXJVgOdvjnKbNhg="
|
||||
},
|
||||
"tgbdual": {
|
||||
"owner": "libretro",
|
||||
|
@ -464,8 +464,8 @@
|
|||
"vba-next": {
|
||||
"owner": "libretro",
|
||||
"repo": "vba-next",
|
||||
"rev": "ebd175d57ebb2065726099d32034cb25934787ce",
|
||||
"sha256": "hTUlhLzvsemNz6wSmlnQNoNtzaVhipA+hmVmhzZVN+w="
|
||||
"rev": "4191e09e2b0fcf175a15348c1fa8a12bbc6320dd",
|
||||
"sha256": "IG2oH4F17tlSv1cXYZobggb37tFNE53JOHzan/X0+ws="
|
||||
},
|
||||
"vecx": {
|
||||
"owner": "libretro",
|
||||
|
|
|
@ -107,10 +107,16 @@ def get_repo_hash_fetchFromGitHub(
|
|||
extra_args = []
|
||||
if deep_clone:
|
||||
extra_args.append("--deep-clone")
|
||||
else:
|
||||
extra_args.append("--no-deep-clone")
|
||||
if fetch_submodules:
|
||||
extra_args.append("--fetch-submodules")
|
||||
else:
|
||||
extra_args.append("--no-fetch-submodules")
|
||||
if leave_dot_git:
|
||||
extra_args.append("--leave-dot-git")
|
||||
else:
|
||||
extra_args.append("--no-leave-dot-git")
|
||||
if rev:
|
||||
extra_args.append("--rev")
|
||||
extra_args.append(rev)
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wrapGAppsHook, alsa-lib
|
||||
, SDL2, zlib, gtkmm3, libXv, libepoxy, minizip, pulseaudio, portaudio }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "snes9x-gtk";
|
||||
version = "1.61";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "snes9xgit";
|
||||
repo = "snes9x";
|
||||
rev = version;
|
||||
fetchSubmodules = true;
|
||||
sha256 = "1kay7aj30x0vn8rkylspdycydrzsc0aidjbs0dd238hr5hid723b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ];
|
||||
buildInputs = [ alsa-lib SDL2 zlib gtkmm3 libXv libepoxy minizip pulseaudio portaudio ];
|
||||
|
||||
preConfigure = "cd gtk";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.snes9x.com";
|
||||
description = "Super Nintendo Entertainment System (SNES) emulator";
|
||||
|
||||
longDescription = ''
|
||||
Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
|
||||
emulator. It basically allows you to play most games designed for the SNES
|
||||
and Super Famicom Nintendo game systems on your PC or Workstation; which
|
||||
includes some real gems that were only ever released in Japan.
|
||||
'';
|
||||
|
||||
# see https://github.com/snes9xgit/snes9x/blob/master/LICENSE for exact details
|
||||
license = licenses.unfreeRedistributable;
|
||||
maintainers = with maintainers; [ qknight xfix ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
130
pkgs/applications/emulators/snes9x/default.nix
Normal file
130
pkgs/applications/emulators/snes9x/default.nix
Normal file
|
@ -0,0 +1,130 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, alsa-lib
|
||||
, autoreconfHook
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, gtkmm3
|
||||
, libepoxy
|
||||
, libpng
|
||||
, libX11
|
||||
, libXv
|
||||
, libXext
|
||||
, libXinerama
|
||||
, meson
|
||||
, minizip
|
||||
, ninja
|
||||
, pkg-config
|
||||
, portaudio
|
||||
, pulseaudio
|
||||
, SDL2
|
||||
, wrapGAppsHook
|
||||
, zlib
|
||||
, withGtk ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname =
|
||||
if withGtk then
|
||||
"snes9x-gtk"
|
||||
else
|
||||
"snes9x";
|
||||
version = "1.61";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "snes9xgit";
|
||||
repo = "snes9x";
|
||||
rev = version;
|
||||
fetchSubmodules = true;
|
||||
sha256 = "1kay7aj30x0vn8rkylspdycydrzsc0aidjbs0dd238hr5hid723b";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix cross-compilation, otherwise it fails to detect host compiler features
|
||||
# Doesn't affect non CC builds
|
||||
(fetchpatch {
|
||||
url = "https://mirror.its.dal.ca/gentoo-portage/games-emulation/snes9x/files/snes9x-1.53-cross-compile.patch";
|
||||
sha256 = "sha256-ZCmnprimz8PtDIXkB1dYD0oura9icW81yKvJ4coKaDg=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
]
|
||||
++ lib.optionals (!withGtk) [
|
||||
autoreconfHook
|
||||
]
|
||||
++ lib.optionals withGtk [
|
||||
meson
|
||||
ninja
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libX11
|
||||
libXext
|
||||
libXv
|
||||
minizip
|
||||
zlib
|
||||
]
|
||||
# on non-Linux platforms this will build without sound support on X11 build
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
pulseaudio
|
||||
]
|
||||
++ lib.optionals (!withGtk) [
|
||||
libpng
|
||||
libXinerama
|
||||
]
|
||||
++ lib.optionals withGtk [
|
||||
gtkmm3
|
||||
libepoxy
|
||||
portaudio
|
||||
SDL2
|
||||
];
|
||||
|
||||
configureFlags =
|
||||
lib.optional stdenv.hostPlatform.sse4_1Support "--enable-sse41"
|
||||
++ lib.optional stdenv.hostPlatform.avx2Support "--enable-avx2";
|
||||
|
||||
installPhase = lib.optionalString (!withGtk) ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 snes9x -t "$out/bin/"
|
||||
install -Dm644 snes9x.conf.default -t "$out/share/doc/${pname}/"
|
||||
install -Dm644 ../docs/{control-inputs,controls,snapshots}.txt -t \
|
||||
"$out/share/doc/${pname}/"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preAutoreconf = lib.optionalString (!withGtk) "cd unix";
|
||||
preConfigure = lib.optionalString withGtk "cd gtk";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib;
|
||||
let
|
||||
interface = if withGtk then "GTK" else "X11";
|
||||
in
|
||||
{
|
||||
homepage = "https://www.snes9x.com";
|
||||
description = "Super Nintendo Entertainment System (SNES) emulator, ${interface} version";
|
||||
|
||||
longDescription = ''
|
||||
Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
|
||||
emulator. It basically allows you to play most games designed for the SNES
|
||||
and Super Famicom Nintendo game systems on your PC or Workstation; which
|
||||
includes some real gems that were only ever released in Japan.
|
||||
|
||||
Version build with ${interface} interface.
|
||||
'';
|
||||
|
||||
license = licenses.unfreeRedistributable // {
|
||||
url = "https://github.com/snes9xgit/snes9x/blob/${version}/LICENSE";
|
||||
};
|
||||
maintainers = with maintainers; [ qknight xfix thiagokokada ];
|
||||
platforms = platforms.unix;
|
||||
broken = (withGtk && stdenv.isDarwin);
|
||||
};
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
{ pname, version, src, branchName
|
||||
, stdenv, lib, wrapQtAppsHook
|
||||
, cmake, pkg-config
|
||||
, libpulseaudio, libjack2, alsa-lib, sndio
|
||||
, vulkan-loader, vulkan-headers
|
||||
, qtbase, qtwebengine, qttools
|
||||
, nlohmann_json, rapidjson
|
||||
, zlib, zstd, libzip, lz4
|
||||
, glslang
|
||||
, boost173
|
||||
, catch2
|
||||
, fmt_8
|
||||
, SDL2
|
||||
, udev
|
||||
, libusb1
|
||||
, ffmpeg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname version src;
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||
buildInputs = [
|
||||
libpulseaudio libjack2 alsa-lib sndio
|
||||
vulkan-loader vulkan-headers
|
||||
qtbase qtwebengine qttools
|
||||
nlohmann_json rapidjson
|
||||
zlib zstd libzip lz4
|
||||
glslang
|
||||
boost173
|
||||
catch2
|
||||
fmt_8
|
||||
SDL2
|
||||
udev
|
||||
libusb1
|
||||
ffmpeg
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DYUZU_USE_BUNDLED_QT=OFF"
|
||||
"-DYUZU_USE_BUNDLED_SDL2=OFF"
|
||||
"-DYUZU_USE_BUNDLED_FFMPEG=OFF"
|
||||
"-DENABLE_QT_TRANSLATION=ON"
|
||||
"-DYUZU_USE_QT_WEB_ENGINE=ON"
|
||||
"-DUSE_DISCORD_PRESENCE=ON"
|
||||
];
|
||||
|
||||
# This changes `ir/opt` to `ir/var/empty` in `externals/dynarmic/src/dynarmic/CMakeLists.txt`
|
||||
# making the build fail, as that path does not exist
|
||||
dontFixCmake = true;
|
||||
|
||||
preConfigure = ''
|
||||
# Trick the configure system. This prevents a check for submodule directories.
|
||||
rm -f .gitmodules
|
||||
|
||||
# see https://github.com/NixOS/nixpkgs/issues/114044, setting this through cmakeFlags does not work.
|
||||
cmakeFlagsArray+=(
|
||||
"-DTITLE_BAR_FORMAT_IDLE=yuzu ${branchName} ${version}"
|
||||
"-DTITLE_BAR_FORMAT_RUNNING=yuzu ${branchName} ${version} | {3}"
|
||||
)
|
||||
'';
|
||||
|
||||
# Fix vulkan detection
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/yuzu --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
||||
wrapProgram $out/bin/yuzu-cmd --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://yuzu-emu.org";
|
||||
description = "The ${branchName} branch of an experimental Nintendo Switch emulator written in C++";
|
||||
longDescription = ''
|
||||
An experimental Nintendo Switch emulator written in C++.
|
||||
Using the mainline branch is recommanded for general usage.
|
||||
Using the early-access branch is recommanded if you would like to try out experimental features, with a cost of stability.
|
||||
'';
|
||||
license = with licenses; [
|
||||
gpl2Plus
|
||||
# Icons
|
||||
cc-by-nd-30 cc0
|
||||
];
|
||||
maintainers = with maintainers; [ ivar joshuafern sbruder ];
|
||||
platforms = platforms.linux;
|
||||
broken = stdenv.isAarch64; # Currently aarch64 is not supported.
|
||||
};
|
||||
}
|
1
pkgs/applications/emulators/yuzu/compatibility-list.json
Normal file
1
pkgs/applications/emulators/yuzu/compatibility-list.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,28 +1,40 @@
|
|||
{ branch ? "mainline", libsForQt5, fetchFromGitHub }:
|
||||
{ branch ? "mainline"
|
||||
, libsForQt5
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
let
|
||||
inherit libsForQt5 fetchFromGitHub;
|
||||
# Fetched from https://api.yuzu-emu.org/gamedb, last updated 2022-03-23.
|
||||
# Please make sure to update this when updating yuzu!
|
||||
compat-list = ./compatibility-list.json;
|
||||
in {
|
||||
mainline = libsForQt5.callPackage ./base.nix rec {
|
||||
mainline = libsForQt5.callPackage ./generic.nix rec {
|
||||
pname = "yuzu-mainline";
|
||||
version = "953";
|
||||
branchName = branch;
|
||||
version = "992";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yuzu-emu";
|
||||
repo = "yuzu-mainline";
|
||||
rev = "mainline-0-${version}";
|
||||
sha256 = "0p07gybyhr6flzmhz92qlrwcq7l37c2wmcxw8sbrvhj2pgaaw9ic";
|
||||
sha256 = "1x3fwwdw86jvygbzy9k99j6avfsd867ywm2x25izw10jznpsaixs";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
inherit branch compat-list;
|
||||
};
|
||||
early-access = libsForQt5.callPackage ./base.nix rec {
|
||||
|
||||
early-access = libsForQt5.callPackage ./generic.nix rec {
|
||||
pname = "yuzu-ea";
|
||||
version = "2557";
|
||||
branchName = branch;
|
||||
version = "2690";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pineappleEA";
|
||||
repo = "pineapple-src";
|
||||
rev = "EA-${version}";
|
||||
sha256 = "013xxgyn8y5fv0xbrm0zfl9xmi0gx4hpflrbjskg1hcvb2bjqyvj";
|
||||
sha256 = "0zm06clbdh9cccq9932q9v976q7sjknynkdvvp04h1wcskmrxi3c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
inherit branch compat-list;
|
||||
};
|
||||
}.${branch}
|
||||
|
|
157
pkgs/applications/emulators/yuzu/generic.nix
Normal file
157
pkgs/applications/emulators/yuzu/generic.nix
Normal file
|
@ -0,0 +1,157 @@
|
|||
{ pname
|
||||
, version
|
||||
, src
|
||||
, branch
|
||||
, compat-list
|
||||
|
||||
, lib
|
||||
, stdenv
|
||||
, runCommandLocal
|
||||
, substituteAll
|
||||
, wrapQtAppsHook
|
||||
, alsa-lib
|
||||
, boost
|
||||
, catch2
|
||||
, cmake
|
||||
, doxygen
|
||||
, ffmpeg
|
||||
, fmt_8
|
||||
, glslang
|
||||
, libjack2
|
||||
, libopus
|
||||
, libpulseaudio
|
||||
, libusb1
|
||||
, libva
|
||||
, libzip
|
||||
, lz4
|
||||
, nlohmann_json
|
||||
, perl
|
||||
, pkg-config
|
||||
, python3
|
||||
, qtbase
|
||||
, qttools
|
||||
, qtwebengine
|
||||
, rapidjson
|
||||
, SDL2
|
||||
, sndio
|
||||
, speexdsp
|
||||
, udev
|
||||
, vulkan-headers
|
||||
, vulkan-loader
|
||||
, zlib
|
||||
, zstd
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname version src;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
doxygen
|
||||
perl
|
||||
pkg-config
|
||||
python3
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
boost
|
||||
catch2
|
||||
ffmpeg
|
||||
fmt_8
|
||||
glslang
|
||||
libjack2
|
||||
libopus
|
||||
libpulseaudio
|
||||
libusb1
|
||||
libva
|
||||
libzip
|
||||
lz4
|
||||
nlohmann_json
|
||||
qtbase
|
||||
qttools
|
||||
qtwebengine
|
||||
rapidjson
|
||||
SDL2
|
||||
sndio
|
||||
speexdsp
|
||||
udev
|
||||
zlib
|
||||
zstd
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
# This changes `ir/opt` to `ir/var/empty` in `externals/dynarmic/src/dynarmic/CMakeLists.txt`
|
||||
# making the build fail, as that path does not exist
|
||||
dontFixCmake = true;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DYUZU_USE_BUNDLED_QT=OFF"
|
||||
"-DYUZU_USE_BUNDLED_FFMPEG=OFF"
|
||||
"-DYUZU_USE_BUNDLED_OPUS=OFF"
|
||||
"-DYUZU_USE_EXTERNAL_SDL2=OFF"
|
||||
|
||||
"-DENABLE_QT_TRANSLATION=ON"
|
||||
"-DYUZU_USE_QT_WEB_ENGINE=ON"
|
||||
"-DUSE_DISCORD_PRESENCE=ON"
|
||||
|
||||
# We dont want to bother upstream with potentially outdated compat reports
|
||||
"-DYUZU_ENABLE_COMPATIBILITY_REPORTING=OFF"
|
||||
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" # We provide this deterministically
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
# This prevents a check for submodule directories.
|
||||
rm -f .gitmodules
|
||||
|
||||
# see https://github.com/NixOS/nixpkgs/issues/114044, setting this through cmakeFlags does not work.
|
||||
cmakeFlagsArray+=(
|
||||
"-DTITLE_BAR_FORMAT_IDLE=yuzu ${branch} ${version}"
|
||||
"-DTITLE_BAR_FORMAT_RUNNING=yuzu ${branch} ${version} | {3}"
|
||||
)
|
||||
'';
|
||||
|
||||
# This must be done after cmake finishes as it overwrites the file
|
||||
postConfigure = ''
|
||||
ln -sf ${compat-list} ./dist/compatibility_list/compatibility_list.json
|
||||
'';
|
||||
|
||||
# Fix vulkan detection
|
||||
postFixup = ''
|
||||
for bin in $out/bin/yuzu $out/bin/yuzu-cmd; do
|
||||
wrapProgram $bin --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
||||
done
|
||||
'';
|
||||
|
||||
passthru.updateScript = runCommandLocal "yuzu-${branch}-updateScript" {
|
||||
script = substituteAll {
|
||||
src = ./update.sh;
|
||||
inherit branch;
|
||||
};
|
||||
} "install -Dm755 $script $out";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://yuzu-emu.org";
|
||||
changelog = "https://yuzu-emu.org/entry";
|
||||
description = "The ${branch} branch of an experimental Nintendo Switch emulator written in C++";
|
||||
longDescription = ''
|
||||
An experimental Nintendo Switch emulator written in C++.
|
||||
Using the mainline branch is recommanded for general usage.
|
||||
Using the early-access branch is recommanded if you would like to try out experimental features, with a cost of stability.
|
||||
'';
|
||||
mainProgram = "yuzu";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = with licenses; [
|
||||
gpl3Plus
|
||||
# Icons
|
||||
cc-by-nd-30 cc0
|
||||
];
|
||||
maintainers = with maintainers; [
|
||||
ivar
|
||||
joshuafern
|
||||
sbruder
|
||||
];
|
||||
};
|
||||
}
|
102
pkgs/applications/emulators/yuzu/update.sh
Executable file
102
pkgs/applications/emulators/yuzu/update.sh
Executable file
|
@ -0,0 +1,102 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p nix nix-prefetch-git coreutils curl jq gnused
|
||||
|
||||
set -e
|
||||
|
||||
# Will be replaced with the actual branch when running this from passthru.updateScript
|
||||
BRANCH="@branch@"
|
||||
|
||||
if [[ ! "$(basename $PWD)" = "yuzu" ]]; then
|
||||
echo "error: Script must be ran from yuzu's directory!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
getLocalVersion() {
|
||||
pushd ../../../.. >/dev/null
|
||||
nix eval --raw -f default.nix "$1".version
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
getLocalHash() {
|
||||
pushd ../../../.. >/dev/null
|
||||
nix eval --raw -f default.nix "$1".src.drvAttrs.outputHash
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
updateCompatList() {
|
||||
NEW_COMPAT_LIST="$(curl -s "https://api.yuzu-emu.org/gamedb")"
|
||||
|
||||
if [[ "$(cat ./compatibility-list.json)" = "${NEW_COMPAT_LIST}" ]]; then
|
||||
echo "Compatibility list is already up to date!"
|
||||
else
|
||||
local TODAY="$(date +"%Y-%m-%d")"
|
||||
|
||||
echo "Compatibility list: updated to $TODAY"
|
||||
echo "${NEW_COMPAT_LIST}" > ./compatibility-list.json
|
||||
|
||||
sed -i -e "s/last updated .*/last updated $TODAY./" ./default.nix
|
||||
fi
|
||||
}
|
||||
|
||||
updateMainline() {
|
||||
OLD_MAINLINE_VERSION="$(getLocalVersion "yuzu-mainline")"
|
||||
OLD_MAINLINE_HASH="$(getLocalHash "yuzu-mainline")"
|
||||
|
||||
NEW_MAINLINE_VERSION="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
"https://api.github.com/repos/yuzu-emu/yuzu-mainline/releases?per_page=1" | jq -r '.[0].name' | cut -d" " -f2)"
|
||||
|
||||
if [[ "${OLD_MAINLINE_VERSION}" = "${NEW_MAINLINE_VERSION}" ]]; then
|
||||
echo "yuzu-mainline is already up to date!"
|
||||
|
||||
[ "$KEEP_GOING" ] && return || exit
|
||||
else
|
||||
echo "yuzu-mainline: ${OLD_MAINLINE_VERSION} -> ${NEW_MAINLINE_VERSION}"
|
||||
fi
|
||||
|
||||
echo " Fetching source code..."
|
||||
|
||||
NEW_MAINLINE_HASH="$(nix-prefetch-git --quiet --fetch-submodules --rev "mainline-0-${NEW_MAINLINE_VERSION}" "https://github.com/yuzu-emu/yuzu-mainline" | jq -r '.sha256')"
|
||||
|
||||
echo " Succesfully fetched. hash: ${NEW_MAINLINE_HASH}"
|
||||
|
||||
sed -i "s/${OLD_MAINLINE_VERSION}/${NEW_MAINLINE_VERSION}/" ./default.nix
|
||||
sed -i "s/${OLD_MAINLINE_HASH}/${NEW_MAINLINE_HASH}/" ./default.nix
|
||||
}
|
||||
|
||||
updateEarlyAccess() {
|
||||
OLD_EA_VERSION="$(getLocalVersion "yuzu-ea")"
|
||||
OLD_EA_HASH="$(getLocalHash "yuzu-ea")"
|
||||
|
||||
NEW_EA_VERSION="$(curl -s ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
"https://api.github.com/repos/pineappleEA/pineapple-src/releases?per_page=1" | jq -r '.[0].name' | cut -d"-" -f2 | cut -d" " -f1)"
|
||||
|
||||
if [[ "${OLD_EA_VERSION}" = "${NEW_EA_VERSION}" ]]; then
|
||||
echo "yuzu-ea is already up to date!"
|
||||
|
||||
[ "$KEEP_GOING" ] && return || exit
|
||||
else
|
||||
echo "yuzu-ea: ${OLD_EA_VERSION} -> ${NEW_EA_VERSION}"
|
||||
fi
|
||||
|
||||
echo " Fetching source code..."
|
||||
|
||||
NEW_EA_HASH="$(nix-prefetch-git --quiet --fetch-submodules --rev "EA-${NEW_EA_VERSION}" "https://github.com/pineappleEA/pineapple-src" | jq -r '.sha256')"
|
||||
|
||||
echo " Succesfully fetched. hash: ${NEW_EA_HASH}"
|
||||
|
||||
sed -i "s/${OLD_EA_VERSION}/${NEW_EA_VERSION}/" ./default.nix
|
||||
sed -i "s/${OLD_EA_HASH}/${NEW_EA_HASH}/" ./default.nix
|
||||
}
|
||||
|
||||
if [[ "$BRANCH" = "mainline" ]]; then
|
||||
updateMainline
|
||||
updateCompatList
|
||||
elif [[ "$BRANCH" = "early-access" ]]; then
|
||||
updateEarlyAccess
|
||||
updateCompatList
|
||||
else
|
||||
KEEP_GOING=1
|
||||
updateMainline
|
||||
updateEarlyAccess
|
||||
updateCompatList
|
||||
fi
|
|
@ -29,7 +29,7 @@
|
|||
, curl
|
||||
, ApplicationServices
|
||||
, Foundation
|
||||
, testVersion
|
||||
, testers
|
||||
, imagemagick
|
||||
}:
|
||||
|
||||
|
@ -45,13 +45,13 @@ in
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "imagemagick";
|
||||
version = "7.1.0-29";
|
||||
version = "7.1.0-31";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ImageMagick";
|
||||
repo = "ImageMagick";
|
||||
rev = version;
|
||||
hash = "sha256-46fJMOIGnK5aNIcG7+8mJdZDcSFyFmhmkLcuVlnupSU=";
|
||||
hash = "sha256-Pf+x3TnmvKTCDL3dGLyAr6JUl5E3BRi/XW/dkuCr2YA=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big
|
||||
|
@ -120,7 +120,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
passthru.tests.version =
|
||||
testVersion { package = imagemagick; };
|
||||
testers.testVersion { package = imagemagick; };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.imagemagick.org/";
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
, desktop-file-utils
|
||||
, exiv2
|
||||
, glib
|
||||
, glib-networking
|
||||
, ilmbase
|
||||
, gtk3
|
||||
, intltool
|
||||
|
@ -71,6 +72,7 @@ stdenv.mkDerivation rec {
|
|||
curl
|
||||
exiv2
|
||||
glib
|
||||
glib-networking
|
||||
gtk3
|
||||
ilmbase
|
||||
lcms2
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "hydrus";
|
||||
version = "481";
|
||||
version = "482";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hydrusnetwork";
|
||||
repo = "hydrus";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-6I4vLJj5WzC2bCtQYnoLGOL6N6pKFU+PZQqaOqhZhWU=";
|
||||
sha256 = "sha256-b7zMHwsyZv4dCn4Gd/2a+MHhT3IHISJup/zm95pEcQ4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -16,6 +16,9 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ];
|
||||
|
||||
# This patch is upstream; remove it in 5.9.
|
||||
patches = [ ./fix-6324.patch ];
|
||||
|
||||
buildInputs = [
|
||||
pixman libpthreadstubs gtkmm3 libXau libXdmcp
|
||||
lcms2 libiptcdata libcanberra-gtk3 fftw expat pcre libsigcxx lensfun librsvg
|
||||
|
|
356
pkgs/applications/graphics/rawtherapee/fix-6324.patch
Normal file
356
pkgs/applications/graphics/rawtherapee/fix-6324.patch
Normal file
|
@ -0,0 +1,356 @@
|
|||
See:
|
||||
https://github.com/Beep6581/RawTherapee/issues/6324
|
||||
https://github.com/Beep6581/RawTherapee/commit/2e0137d54243eb729d4a5f939c4320ec8f8f415d
|
||||
|
||||
diff --git a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc
|
||||
index 6274154cb..98c743dad 100644
|
||||
--- a/rtengine/canon_cr3_decoder.cc
|
||||
+++ b/rtengine/canon_cr3_decoder.cc
|
||||
@@ -662,7 +662,7 @@ std::uint32_t _byteswap_ulong(std::uint32_t x)
|
||||
#endif
|
||||
|
||||
struct LibRaw_abstract_datastream {
|
||||
- IMFILE* ifp;
|
||||
+ rtengine::IMFILE* ifp;
|
||||
|
||||
void lock()
|
||||
{
|
||||
diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
|
||||
index 812f122b3..5da696af2 100644
|
||||
--- a/rtengine/dcraw.cc
|
||||
+++ b/rtengine/dcraw.cc
|
||||
@@ -2025,7 +2025,7 @@ void CLASS phase_one_load_raw_c()
|
||||
#endif
|
||||
{
|
||||
int len[2], pred[2];
|
||||
- IMFILE ifpthr = *ifp;
|
||||
+ rtengine::IMFILE ifpthr = *ifp;
|
||||
ifpthr.plistener = nullptr;
|
||||
|
||||
#ifdef _OPENMP
|
||||
@@ -3380,7 +3380,7 @@ void CLASS sony_arw2_load_raw()
|
||||
{
|
||||
uchar *data = new (std::nothrow) uchar[raw_width + 1];
|
||||
merror(data, "sony_arw2_load_raw()");
|
||||
- IMFILE ifpthr = *ifp;
|
||||
+ rtengine::IMFILE ifpthr = *ifp;
|
||||
int pos = ifpthr.pos;
|
||||
ushort pix[16];
|
||||
|
||||
@@ -6394,7 +6394,7 @@ int CLASS parse_tiff_ifd (int base)
|
||||
unsigned sony_curve[] = { 0,0,0,0,0,4095 };
|
||||
unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
|
||||
struct jhead jh;
|
||||
-/*RT*/ IMFILE *sfp;
|
||||
+/*RT*/ rtengine::IMFILE *sfp;
|
||||
/*RT*/ int pana_raw = 0;
|
||||
|
||||
if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
|
||||
@@ -6958,7 +6958,7 @@ it under the terms of the one of two licenses as you choose:
|
||||
fread (buf, sony_length, 1, ifp);
|
||||
sony_decrypt (buf, sony_length/4, 1, sony_key);
|
||||
sfp = ifp;
|
||||
-/*RT*/ ifp = fopen (buf, sony_length);
|
||||
+/*RT*/ ifp = rtengine::fopen (buf, sony_length);
|
||||
// if ((ifp = tmpfile())) {
|
||||
// fwrite (buf, sony_length, 1, ifp);
|
||||
// fseek (ifp, 0, SEEK_SET);
|
||||
@@ -7264,7 +7264,7 @@ void CLASS parse_external_jpeg()
|
||||
{
|
||||
const char *file, *ext;
|
||||
char *jname, *jfile, *jext;
|
||||
-/*RT*/ IMFILE *save=ifp;
|
||||
+/*RT*/ rtengine::IMFILE *save=ifp;
|
||||
|
||||
ext = strrchr (ifname, '.');
|
||||
file = strrchr (ifname, '/');
|
||||
@@ -7292,7 +7292,7 @@ void CLASS parse_external_jpeg()
|
||||
*jext = '0';
|
||||
}
|
||||
if (strcmp (jname, ifname)) {
|
||||
-/*RT*/ if ((ifp = fopen (jname))) {
|
||||
+/*RT*/ if ((ifp = rtengine::fopen (jname))) {
|
||||
// if ((ifp = fopen (jname, "rb"))) {
|
||||
if (verbose)
|
||||
fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
|
||||
diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h
|
||||
index 89c1fcaff..f25157088 100644
|
||||
--- a/rtengine/dcraw.h
|
||||
+++ b/rtengine/dcraw.h
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
protected:
|
||||
int exif_base, ciff_base, ciff_len;
|
||||
- IMFILE *ifp;
|
||||
+ rtengine::IMFILE *ifp;
|
||||
FILE *ofp;
|
||||
short order;
|
||||
const char *ifname;
|
||||
@@ -125,7 +125,7 @@ protected:
|
||||
int cur_buf_size; // buffer size
|
||||
uchar *cur_buf; // currently read block
|
||||
int fillbytes; // Counter to add extra byte for block size N*16
|
||||
- IMFILE *input;
|
||||
+ rtengine::IMFILE *input;
|
||||
struct int_pair grad_even[3][41]; // tables of gradients
|
||||
struct int_pair grad_odd[3][41];
|
||||
ushort *linealloc;
|
||||
@@ -278,7 +278,7 @@ void parse_redcine();
|
||||
class getbithuff_t
|
||||
{
|
||||
public:
|
||||
- getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
|
||||
+ getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
|
||||
unsigned operator()(int nbits, ushort *huff);
|
||||
|
||||
private:
|
||||
@@ -288,7 +288,7 @@ private:
|
||||
DCraw *parent;
|
||||
unsigned bitbuf;
|
||||
int vbits, reset;
|
||||
- IMFILE *&ifp;
|
||||
+ rtengine::IMFILE *&ifp;
|
||||
unsigned &zero_after_ff;
|
||||
};
|
||||
getbithuff_t getbithuff;
|
||||
@@ -296,7 +296,7 @@ getbithuff_t getbithuff;
|
||||
class nikbithuff_t
|
||||
{
|
||||
public:
|
||||
- explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
|
||||
+ explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
|
||||
void operator()() {bitbuf = vbits = 0;};
|
||||
unsigned operator()(int nbits, ushort *huff);
|
||||
unsigned errorCount() { return errors; }
|
||||
@@ -309,7 +309,7 @@ private:
|
||||
}
|
||||
unsigned bitbuf, errors;
|
||||
int vbits;
|
||||
- IMFILE *&ifp;
|
||||
+ rtengine::IMFILE *&ifp;
|
||||
};
|
||||
nikbithuff_t nikbithuff;
|
||||
|
||||
@@ -378,7 +378,7 @@ void parse_qt (int end);
|
||||
// ph1_bithuff(int nbits, ushort *huff);
|
||||
class ph1_bithuff_t {
|
||||
public:
|
||||
- ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
|
||||
+ ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
|
||||
unsigned operator()(int nbits, ushort *huff);
|
||||
unsigned operator()(int nbits);
|
||||
unsigned operator()();
|
||||
@@ -412,7 +412,7 @@ private:
|
||||
}
|
||||
|
||||
short ℴ
|
||||
- IMFILE* const ifp;
|
||||
+ rtengine::IMFILE* const ifp;
|
||||
UINT64 bitbuf;
|
||||
int vbits;
|
||||
};
|
||||
@@ -430,11 +430,11 @@ void nokia_load_raw();
|
||||
|
||||
class pana_bits_t{
|
||||
public:
|
||||
- pana_bits_t(IMFILE *i, unsigned &u, unsigned enc):
|
||||
+ pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc):
|
||||
ifp(i), load_flags(u), vbits(0), encoding(enc) {}
|
||||
unsigned operator()(int nbits, unsigned *bytes=nullptr);
|
||||
private:
|
||||
- IMFILE *ifp;
|
||||
+ rtengine::IMFILE *ifp;
|
||||
unsigned &load_flags;
|
||||
uchar buf[0x4000];
|
||||
int vbits;
|
||||
diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
|
||||
index 1fb1d2e1b..951df2248 100644
|
||||
--- a/rtengine/dfmanager.cc
|
||||
+++ b/rtengine/dfmanager.cc
|
||||
@@ -540,7 +540,7 @@ std::vector<badPix> *DFManager::getHotPixels ( const std::string &mak, const std
|
||||
|
||||
int DFManager::scanBadPixelsFile( Glib::ustring filename )
|
||||
{
|
||||
- FILE *file = fopen( filename.c_str(), "r" );
|
||||
+ FILE *file = ::fopen( filename.c_str(), "r" );
|
||||
|
||||
if( !file ) {
|
||||
return false;
|
||||
diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc
|
||||
index 842766dcf..2321d18bb 100644
|
||||
--- a/rtengine/myfile.cc
|
||||
+++ b/rtengine/myfile.cc
|
||||
@@ -70,7 +70,7 @@ int munmap(void *start, size_t length)
|
||||
|
||||
#ifdef MYFILE_MMAP
|
||||
|
||||
-IMFILE* fopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::fopen (const char* fname)
|
||||
{
|
||||
int fd;
|
||||
|
||||
@@ -123,13 +123,13 @@ IMFILE* fopen (const char* fname)
|
||||
return mf;
|
||||
}
|
||||
|
||||
-IMFILE* gfopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::gfopen (const char* fname)
|
||||
{
|
||||
return fopen(fname);
|
||||
}
|
||||
#else
|
||||
|
||||
-IMFILE* fopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::fopen (const char* fname)
|
||||
{
|
||||
|
||||
FILE* f = g_fopen (fname, "rb");
|
||||
@@ -152,7 +152,7 @@ IMFILE* fopen (const char* fname)
|
||||
return mf;
|
||||
}
|
||||
|
||||
-IMFILE* gfopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::gfopen (const char* fname)
|
||||
{
|
||||
|
||||
FILE* f = g_fopen (fname, "rb");
|
||||
@@ -176,7 +176,7 @@ IMFILE* gfopen (const char* fname)
|
||||
}
|
||||
#endif //MYFILE_MMAP
|
||||
|
||||
-IMFILE* fopen (unsigned* buf, int size)
|
||||
+rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size)
|
||||
{
|
||||
|
||||
IMFILE* mf = new IMFILE;
|
||||
@@ -190,7 +190,7 @@ IMFILE* fopen (unsigned* buf, int size)
|
||||
return mf;
|
||||
}
|
||||
|
||||
-void fclose (IMFILE* f)
|
||||
+void rtengine::fclose (IMFILE* f)
|
||||
{
|
||||
#ifdef MYFILE_MMAP
|
||||
|
||||
@@ -207,7 +207,7 @@ void fclose (IMFILE* f)
|
||||
delete f;
|
||||
}
|
||||
|
||||
-int fscanf (IMFILE* f, const char* s ...)
|
||||
+int rtengine::fscanf (IMFILE* f, const char* s ...)
|
||||
{
|
||||
// fscanf not easily wrapped since we have no terminating \0 at end
|
||||
// of file data and vsscanf() won't tell us how many characters that
|
||||
@@ -253,7 +253,7 @@ int fscanf (IMFILE* f, const char* s ...)
|
||||
}
|
||||
|
||||
|
||||
-char* fgets (char* s, int n, IMFILE* f)
|
||||
+char* rtengine::fgets (char* s, int n, IMFILE* f)
|
||||
{
|
||||
|
||||
if (f->pos >= f->size) {
|
||||
@@ -270,7 +270,7 @@ char* fgets (char* s, int n, IMFILE* f)
|
||||
return s;
|
||||
}
|
||||
|
||||
-void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
|
||||
+void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
|
||||
{
|
||||
f->plistener = plistener;
|
||||
f->progress_range = progress_range;
|
||||
@@ -278,7 +278,7 @@ void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, doub
|
||||
f->progress_current = 0;
|
||||
}
|
||||
|
||||
-void imfile_update_progress(IMFILE *f)
|
||||
+void rtengine::imfile_update_progress(IMFILE *f)
|
||||
{
|
||||
if (!f->plistener || f->progress_current < f->progress_next) {
|
||||
return;
|
||||
diff --git a/rtengine/myfile.h b/rtengine/myfile.h
|
||||
index 423edea9a..c655696e6 100644
|
||||
--- a/rtengine/myfile.h
|
||||
+++ b/rtengine/myfile.h
|
||||
@@ -30,8 +30,6 @@ namespace rtengine
|
||||
|
||||
class ProgressListener;
|
||||
|
||||
-}
|
||||
-
|
||||
struct IMFILE {
|
||||
int fd;
|
||||
ssize_t pos;
|
||||
@@ -141,3 +139,5 @@ inline unsigned char* fdata(int offset, IMFILE* f)
|
||||
|
||||
int fscanf (IMFILE* f, const char* s ...);
|
||||
char* fgets (char* s, int n, IMFILE* f);
|
||||
+
|
||||
+}
|
||||
diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
|
||||
index 9da601e2a..097b9e711 100644
|
||||
--- a/rtengine/rtthumbnail.cc
|
||||
+++ b/rtengine/rtthumbnail.cc
|
||||
@@ -1922,7 +1922,7 @@ bool Thumbnail::writeImage (const Glib::ustring& fname)
|
||||
|
||||
Glib::ustring fullFName = fname + ".rtti";
|
||||
|
||||
- FILE* f = g_fopen (fullFName.c_str (), "wb");
|
||||
+ FILE* f = ::g_fopen (fullFName.c_str (), "wb");
|
||||
|
||||
if (!f) {
|
||||
return false;
|
||||
@@ -1965,7 +1965,7 @@ bool Thumbnail::readImage (const Glib::ustring& fname)
|
||||
return false;
|
||||
}
|
||||
|
||||
- FILE* f = g_fopen(fullFName.c_str (), "rb");
|
||||
+ FILE* f = ::g_fopen(fullFName.c_str (), "rb");
|
||||
|
||||
if (!f) {
|
||||
return false;
|
||||
@@ -2191,7 +2191,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname)
|
||||
return false;
|
||||
}
|
||||
|
||||
- FILE *f = g_fopen (fname.c_str (), "wt");
|
||||
+ FILE *f = ::g_fopen (fname.c_str (), "wt");
|
||||
|
||||
if (!f) {
|
||||
if (settings->verbose) {
|
||||
@@ -2214,7 +2214,7 @@ bool Thumbnail::readEmbProfile (const Glib::ustring& fname)
|
||||
embProfile = nullptr;
|
||||
embProfileLength = 0;
|
||||
|
||||
- FILE* f = g_fopen (fname.c_str (), "rb");
|
||||
+ FILE* f = ::g_fopen (fname.c_str (), "rb");
|
||||
|
||||
if (f) {
|
||||
if (!fseek (f, 0, SEEK_END)) {
|
||||
@@ -2242,7 +2242,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname)
|
||||
{
|
||||
|
||||
if (embProfileData) {
|
||||
- FILE* f = g_fopen (fname.c_str (), "wb");
|
||||
+ FILE* f = ::g_fopen (fname.c_str (), "wb");
|
||||
|
||||
if (f) {
|
||||
fwrite (embProfileData, 1, embProfileLength, f);
|
||||
@@ -2257,7 +2257,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname)
|
||||
bool Thumbnail::readAEHistogram (const Glib::ustring& fname)
|
||||
{
|
||||
|
||||
- FILE* f = g_fopen(fname.c_str(), "rb");
|
||||
+ FILE* f = ::g_fopen(fname.c_str(), "rb");
|
||||
|
||||
if (!f) {
|
||||
aeHistogram.reset();
|
||||
@@ -2280,7 +2280,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname)
|
||||
{
|
||||
|
||||
if (aeHistogram) {
|
||||
- FILE* f = g_fopen (fname.c_str (), "wb");
|
||||
+ FILE* f = ::g_fopen (fname.c_str (), "wb");
|
||||
|
||||
if (f) {
|
||||
fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f);
|
|
@ -1,10 +1,15 @@
|
|||
{ lib, stdenv, fetchurl
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
|
||||
# Build-time dependencies
|
||||
# Build-time dependencies
|
||||
, makeWrapper
|
||||
, file
|
||||
, makeDesktopItem
|
||||
, imagemagick
|
||||
, copyDesktopItems
|
||||
|
||||
# Runtime dependencies
|
||||
# Runtime dependencies
|
||||
, fontconfig
|
||||
, freetype
|
||||
, libX11
|
||||
|
@ -12,104 +17,120 @@
|
|||
, libXinerama
|
||||
, libXrandr
|
||||
, libXrender
|
||||
, libGL
|
||||
, openal}:
|
||||
, libglvnd
|
||||
, openal
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.0";
|
||||
|
||||
arch = if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
"x64"
|
||||
else if stdenv.hostPlatform.system == "i686-linux" then
|
||||
"x86"
|
||||
else
|
||||
throw "Unsupported platform ${stdenv.hostPlatform.system}";
|
||||
|
||||
arch =
|
||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
"x64"
|
||||
else if stdenv.hostPlatform.system == "i686-linux" then
|
||||
"x86"
|
||||
else
|
||||
throw "Unsupported platform ${stdenv.hostPlatform.system}";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "unigine-valley";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://assets.unigine.com/d/Unigine_Valley-${version}.run";
|
||||
sha256 = "5f0c8bd2431118551182babbf5f1c20fb14e7a40789697240dcaf546443660f4";
|
||||
};
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "unigine-valley";
|
||||
inherit version;
|
||||
|
||||
sourceRoot = "Unigine_Valley-${version}";
|
||||
instPath = "lib/unigine/valley";
|
||||
src = fetchurl {
|
||||
url = "https://m11-assets.unigine.com/d/Unigine_Valley-${version}.run";
|
||||
sha256 = "5f0c8bd2431118551182babbf5f1c20fb14e7a40789697240dcaf546443660f4";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [file makeWrapper];
|
||||
sourceRoot = "Unigine_Valley-${version}";
|
||||
instPath = "lib/unigine/valley";
|
||||
|
||||
libPath = lib.makeLibraryPath [
|
||||
stdenv.cc.cc # libstdc++.so.6
|
||||
fontconfig
|
||||
freetype
|
||||
libX11
|
||||
libXext
|
||||
libXinerama
|
||||
libXrandr
|
||||
libXrender
|
||||
libGL
|
||||
openal
|
||||
];
|
||||
nativeBuildInputs = [ file makeWrapper imagemagick copyDesktopItems ];
|
||||
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
libPath = lib.makeLibraryPath [
|
||||
stdenv.cc.cc # libstdc++.so.6
|
||||
fontconfig
|
||||
freetype
|
||||
libX11
|
||||
libXext
|
||||
libXinerama
|
||||
libXrandr
|
||||
libXrender
|
||||
libglvnd
|
||||
openal
|
||||
];
|
||||
|
||||
cp $src extractor.run
|
||||
chmod +x extractor.run
|
||||
./extractor.run --target $sourceRoot
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
|
||||
runHook postUnpack
|
||||
'';
|
||||
cp $src extractor.run
|
||||
chmod +x extractor.run
|
||||
./extractor.run --target $sourceRoot
|
||||
|
||||
patchPhase = ''
|
||||
runHook prePatch
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
# Patch ELF files.
|
||||
elfs=$(find bin -type f | xargs file | grep ELF | cut -d ':' -f 1)
|
||||
for elf in $elfs; do
|
||||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $elf || true
|
||||
done
|
||||
postPatch = ''
|
||||
# Patch ELF files.
|
||||
elfs=$(find bin -type f | xargs file | grep ELF | cut -d ':' -f 1)
|
||||
for elf in $elfs; do
|
||||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $elf || true
|
||||
done
|
||||
'';
|
||||
|
||||
runHook postPatch
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
instdir=$out/${instPath}
|
||||
mkdir -p $out/share/icons/hicolor $out/share/applications $out/bin $instdir/bin
|
||||
|
||||
instdir=$out/${instPath}
|
||||
# Install executables and libraries
|
||||
install -m 0755 bin/browser_${arch} $instdir/bin
|
||||
install -m 0755 bin/libApp{Stereo,Surround,Wall}_${arch}.so $instdir/bin
|
||||
install -m 0755 bin/libGPUMonitor_${arch}.so $instdir/bin
|
||||
install -m 0755 bin/libQt{Core,Gui,Network,WebKit,Xml}Unigine_${arch}.so.4 $instdir/bin
|
||||
install -m 0755 bin/libUnigine_${arch}.so $instdir/bin
|
||||
install -m 0755 bin/valley_${arch} $instdir/bin
|
||||
install -m 0755 valley $instdir
|
||||
install -m 0755 valley $out/bin/valley
|
||||
|
||||
# Install executables and libraries
|
||||
mkdir -p $instdir/bin
|
||||
install -m 0755 bin/browser_${arch} $instdir/bin
|
||||
install -m 0755 bin/libApp{Stereo,Surround,Wall}_${arch}.so $instdir/bin
|
||||
install -m 0755 bin/libGPUMonitor_${arch}.so $instdir/bin
|
||||
install -m 0755 bin/libQt{Core,Gui,Network,WebKit,Xml}Unigine_${arch}.so.4 $instdir/bin
|
||||
install -m 0755 bin/libUnigine_${arch}.so $instdir/bin
|
||||
install -m 0755 bin/valley_${arch} $instdir/bin
|
||||
install -m 0755 valley $instdir
|
||||
# Install other files
|
||||
cp -R data documentation $instdir
|
||||
|
||||
# Install other files
|
||||
cp -R data documentation $instdir
|
||||
# Install and wrap executable
|
||||
wrapProgram $out/bin/valley \
|
||||
--chdir "$instdir" \
|
||||
--prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath
|
||||
|
||||
# Install and wrap executable
|
||||
mkdir -p $out/bin
|
||||
install -m 0755 valley $out/bin/valley
|
||||
wrapProgram $out/bin/valley \
|
||||
--chdir "$instdir" \
|
||||
--prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath
|
||||
# Make desktop Icon
|
||||
convert $out/lib/unigine/valley/data/launcher/icon.png -resize 128x128 $out/share/icons/Valley.png
|
||||
for RES in 16 24 32 48 64 128 256
|
||||
do
|
||||
mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps
|
||||
convert $out/lib/unigine/valley/data/launcher/icon.png -resize "$RES"x"$RES" $out/share/icons/hicolor/"$RES"x"$RES"/apps/Valley.png
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
stripDebugList = ["${instPath}/bin"];
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "Valley";
|
||||
exec = "valley";
|
||||
genericName = "A GPU Stress test tool from the UNIGINE";
|
||||
icon = "Valley";
|
||||
desktopName = "Valley Benchmark";
|
||||
})
|
||||
];
|
||||
|
||||
stripDebugList = [ "${instPath}/bin" ];
|
||||
|
||||
meta = {
|
||||
description = "The Unigine Valley GPU benchmarking tool";
|
||||
homepage = "https://unigine.com/products/benchmarks/valley/";
|
||||
license = lib.licenses.unfree; # see also: $out/$instPath/documentation/License.pdf
|
||||
maintainers = [ lib.maintainers.kierdavis ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
meta = {
|
||||
description = "The Unigine Valley GPU benchmarking tool";
|
||||
homepage = "https://unigine.com/products/benchmarks/valley/";
|
||||
license = lib.licenses.unfree; # see also: $out/$instPath/documentation/License.pdf
|
||||
maintainers = [ lib.maintainers.kierdavis ];
|
||||
platforms = ["x86_64-linux" "i686-linux"];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@ let
|
|||
if extension == "zip" then fetchzip args else fetchurl args;
|
||||
|
||||
pname = "1password-cli";
|
||||
version = "2.0.0";
|
||||
version = "2.0.2";
|
||||
sources = rec {
|
||||
aarch64-linux = fetch "linux_arm64" "sha256-NhCs68on8LzoeOmM5eP8LwmFaVWz6aghqtHzfUlACiA=" "zip";
|
||||
i686-linux = fetch "linux_386" "sha256-vCxgEBq4YVfljq2zUpvBdZUbIiam4z64P1m9OMWq1f4=" "zip";
|
||||
x86_64-linux = fetch "linux_amd64" "sha256-CDwrJ5ksXf9kwHobw4jvRUi1hLQzq4/yRlk+kHPN7UE=" "zip";
|
||||
aarch64-darwin = fetch "apple_universal" "sha256-DC9hdzRjQ9iNjbe6PfRpMXzDeInq4rYSAa2nDHQMTRo=" "pkg";
|
||||
aarch64-linux = fetch "linux_arm64" "sha256-DhKxY4Ry1IpT16UC3HbbUSKWzhGm/0R7rYrvqupg/Zo=" "zip";
|
||||
i686-linux = fetch "linux_386" "sha256-ANoOYjG4+mci6TdF4HC9fP8e5eAckrbZITRuA1fqtCA=" "zip";
|
||||
x86_64-linux = fetch "linux_amd64" "sha256-uPudElKu30smsupSIvGAmrF/f9TXoTzyUfSrUAvTDWw=" "zip";
|
||||
aarch64-darwin = fetch "apple_universal" "sha256-P5qsy4kiE/DMJnJr3EUHMcb0KoUZyO2BQ5PIosPbnI8=" "pkg";
|
||||
x86_64-darwin = aarch64-darwin;
|
||||
};
|
||||
platforms = builtins.attrNames sources;
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "calcurse";
|
||||
version = "4.7.1";
|
||||
version = "4.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://calcurse.org/files/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-CnxV0HZ0Vp0WbAsOdYeyly09qBYM231gsdvSiVgDr7A=";
|
||||
sha256 = "sha256-SKc2ZmzEtrUwEtc7OqcBUsGLQebHtIB/qw8WjWRa4yw=";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses gettext python3 python3Packages.wrapPython ];
|
||||
|
@ -28,7 +28,8 @@ stdenv.mkDerivation rec {
|
|||
be used to filter and format appointments, making it suitable for use in scripts.
|
||||
'';
|
||||
homepage = "https://calcurse.org/";
|
||||
changelog = "https://git.calcurse.org/calcurse.git/plain/CHANGES.md?h=v${version}";
|
||||
license = licenses.bsd2;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, cairo, dbus, systemd, gdk-pixbuf, glib, libX11, libXScrnSaver
|
||||
, wayland, wayland-protocols
|
||||
, libXinerama, libnotify, pango, xorgproto, librsvg
|
||||
, testVersion, dunst
|
||||
, testers, dunst
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
||||
'';
|
||||
|
||||
passthru.tests.version = testVersion { package = dunst; };
|
||||
passthru.tests.version = testers.testVersion { package = dunst; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Lightweight and customizable notification daemon";
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "fluidd";
|
||||
version = "1.17.1";
|
||||
version = "1.17.2";
|
||||
|
||||
src = fetchurl {
|
||||
name = "fluidd-v${version}.zip";
|
||||
url = "https://github.com/cadriel/fluidd/releases/download/v${version}/fluidd.zip";
|
||||
sha256 = "sha256-F4hAFLsZmRg/zeTHo9eYoT0BasorynGaSzNSbKr2/JE=";
|
||||
sha256 = "sha256-kb7t3H2gpiN6/N/LxyG/Vu5Cp/zytAePsXmacxVyWCk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
, stdenv
|
||||
, fetchurl
|
||||
, nixos
|
||||
, testVersion
|
||||
, testers
|
||||
, hello
|
||||
}:
|
||||
|
@ -19,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
doCheck = true;
|
||||
|
||||
passthru.tests = {
|
||||
version = testVersion { package = hello; };
|
||||
version = testers.testVersion { package = hello; };
|
||||
|
||||
invariant-under-noXlibs =
|
||||
testers.testEqualDerivation
|
||||
|
|
|
@ -55,7 +55,7 @@ stdenv.mkDerivation {
|
|||
ln -s $opt/data/resources $opt/x86_64/resources
|
||||
'';
|
||||
|
||||
updateScript = writeShellScript "hubstaff-updater" ''
|
||||
passthru.updateScript = writeShellScript "hubstaff-updater" ''
|
||||
set -eu -o pipefail
|
||||
|
||||
installation_script_url=$(curl --fail --head --location --silent --output /dev/null --write-out %{url_effective} https://app.hubstaff.com/download/linux)
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "IPMIView";
|
||||
version = "2.19.0";
|
||||
buildVersion = "210401";
|
||||
version = "2.20.0";
|
||||
buildVersion = "220309";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
|
||||
sha256 = "sha256-6hxOu/Wkcrp9MaMYlxOR2DZW21Wi3BIFZp3Vm8NRBWs=";
|
||||
hash = "sha256-qtklBMuK0jb9Ye0IkYM2WYFRMAfZg9tk08a1JQ64cjA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ patchelf makeWrapper ];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
, kjobwidgets
|
||||
, kxmlgui
|
||||
, lib
|
||||
, testVersion
|
||||
, testers
|
||||
, k4dirstat
|
||||
}:
|
||||
|
||||
|
@ -26,7 +26,7 @@ mkDerivation rec {
|
|||
buildInputs = [ kiconthemes kio kjobwidgets kxmlgui ];
|
||||
|
||||
passthru.tests.version =
|
||||
testVersion {
|
||||
testers.testVersion {
|
||||
package = k4dirstat;
|
||||
command = "k4dirstat -platform offscreen --version &>/dev/stdout";
|
||||
};
|
||||
|
|
|
@ -84,13 +84,13 @@ let
|
|||
in
|
||||
buildPythonApplication rec {
|
||||
pname = "lutris-original";
|
||||
version = "0.5.10";
|
||||
version = "0.5.10.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lutris";
|
||||
repo = "lutris";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-PrnULCdQXNZ9OTa00NVyqiTdKRRkAYBcDj7lMwEqkw4=";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-Bf8UEGEM6M4PKoX/qKQNb9XxrxLcjKZD1vR3R2/PykI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
}:
|
||||
mkDerivation rec {
|
||||
pname = "megasync";
|
||||
version = "4.6.3.0";
|
||||
version = "4.6.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "meganz";
|
||||
repo = "MEGAsync";
|
||||
rev = "v${version}_Linux";
|
||||
sha256 = "1j86vr8n2a17my61vkmx83cay1ibllzjprl5bfwaby5ibh4zclz4";
|
||||
sha256 = "sha256-2gsJmMnt0+4vknd2HgOtCYCjVWT7eD0WBimmtsFEhvY=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "metadata-cleaner";
|
||||
version = "2.2.1";
|
||||
version = "2.2.2";
|
||||
|
||||
format = "other";
|
||||
|
||||
|
@ -26,7 +26,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
owner = "rmnvgr";
|
||||
repo = "metadata-cleaner";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-clCCVOoiInaxg9++GiHMLaD+k0gAvt3oOmqQ/a+WgCE=";
|
||||
hash = "sha256-V3qcQQwc2ykVTVgUJuNnVQ9iSPD0tv4C2hSILLxuE70=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue