···545545546546Here in the nixpkgs manual we describe mostly _package tests_; for _module tests_ head over to the corresponding [section in the NixOS manual](https://nixos.org/manual/nixos/stable/#sec-nixos-tests).
547547548548-### Writing package tests {#ssec-package-tests-writing}
548548+### Writing inline package tests {#ssec-inline-package-tests-writing}
549549+550550+For very simple tests, they can be written inline:
551551+552552+```nix
553553+{ …, yq-go }:
554554+555555+buildGoModule rec {
556556+ …
557557+558558+ passthru.tests = {
559559+ simple = runCommand "${pname}-test" {} ''
560560+ echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
561561+ [ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
562562+ '';
563563+ };
564564+}
565565+```
566566+567567+### Writing larger package tests {#ssec-package-tests-writing}
549568550569This is an example using the `phoronix-test-suite` package with the current best practices.
551570
+24-1
doc/stdenv/meta.chapter.md
···134134This attribute is special in that it is not actually under the `meta` attribute set but rather under the `passthru` attribute set. This is due to how `meta` attributes work, and the fact that they are supposed to contain only metadata, not derivations.
135135:::
136136137137-An attribute set with as values tests. A test is a derivation, which builds successfully when the test passes, and fails to build otherwise. A derivation that is a test needs to have `meta.timeout` defined.
137137+An attribute set with tests as values. A test is a derivation that builds when the test passes and fails to build otherwise.
138138+139139+You can run these tests with:
140140+141141+```ShellSession
142142+$ cd path/to/nixpkgs
143143+$ nix-build -A your-package.tests
144144+```
145145+146146+#### Package tests
147147+148148+Tests that are part of the source package are often executed in the `installCheckPhase`.
149149+150150+Prefer `passthru.tests` for tests that are introduced in nixpkgs because:
151151+152152+* `passthru.tests` tests the 'real' package, independently from the environment in which it was built
153153+* we can run `passthru.tests` independently
154154+* `installCheckPhase` adds overhead to each build
155155+156156+For more on how to write and run package tests, see <xref linkend="sec-package-tests"/>.
157157+158158+#### NixOS tests
138159139160The NixOS tests are available as `nixosTests` in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
140161···147168 };
148169}
149170```
171171+172172+NixOS tests run in a VM, so they are slower than regular package tests. For more information see [NixOS module tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests).
150173151174### `timeout` {#var-meta-timeout}
152175
+2
doc/stdenv/stdenv.chapter.md
···714714715715The installCheck phase checks whether the package was installed correctly by running its test suite against the installed directories. The default `installCheck` calls `make installcheck`.
716716717717+It is often better to add tests that are not part of the source distribution to `passthru.tests` (see <xref linkend="var-meta-tests"/>). This avoids adding overhead to every build and enables us to run them independently.
718718+717719#### Variables controlling the installCheck phase {#variables-controlling-the-installcheck-phase}
718720719721##### `doInstallCheck` {#var-stdenv-doInstallCheck}
+1-1
lib/generators.nix
···248248 then v.__pretty v.val
249249 else if v == {} then "{ }"
250250 else if v ? type && v.type == "derivation" then
251251- "<derivation ${v.drvPath}>"
251251+ "<derivation ${v.drvPath or "???"}>"
252252 else "{" + introSpace
253253 + libStr.concatStringsSep introSpace (libAttr.mapAttrsToList
254254 (name: value:
+62-68
maintainers/scripts/pluginupdate.py
···4242}
43434444log = logging.getLogger()
4545-log.addHandler(logging.StreamHandler())
4646-47454846def retry(ExceptionToCheck: Any, tries: int = 4, delay: float = 3, backoff: float = 2):
4947 """Retry calling the decorated function using an exponential backoff.
···8886 owner: str
8987 repo: str
9088 branch: str
9191- alias: str
8989+ alias: Optional[str]
929093919492class Repo:
···203201 name: str,
204202 root: Path,
205203 get_plugins: str,
206206- generate_nix: Callable[[List[Tuple[str, str, Plugin]], str], None],
207204 default_in: Optional[Path] = None,
208205 default_out: Optional[Path] = None,
209206 deprecated: Optional[Path] = None,
···213210 self.name = name
214211 self.root = root
215212 self.get_plugins = get_plugins
216216- self._generate_nix = generate_nix
217213 self.default_in = default_in or root.joinpath(f"{name}-plugin-names")
218214 self.default_out = default_out or root.joinpath("generated.nix")
219215 self.deprecated = deprecated or root.joinpath("deprecated.json")
···226222 def load_plugin_spec(self, plugin_file) -> List[PluginDesc]:
227223 return load_plugin_spec(plugin_file)
228224229229- def generate_nix(self, plugins, outfile):
225225+ def generate_nix(self, plugins, outfile: str):
230226 '''Returns nothing for now, writes directly to outfile'''
231231- self._generate_nix(plugins, outfile)
227227+ raise NotImplementedError()
232228233229 def get_update(self, input_file: str, outfile: str, proc: int):
234230 return get_update(input_file, outfile, proc, editor=self)
···237233 def attr_path(self):
238234 return self.name + "Plugins"
239235236236+ def get_drv_name(self, name: str):
237237+ return self.attr_path + "." + name
238238+240239 def rewrite_input(self, *args, **kwargs):
241240 return rewrite_input(*args, **kwargs)
242241242242+ def create_parser(self):
243243+ parser = argparse.ArgumentParser(
244244+ description=(
245245+ f"Updates nix derivations for {self.name} plugins"
246246+ f"By default from {self.default_in} to {self.default_out}"
247247+ )
248248+ )
249249+ parser.add_argument(
250250+ "--add",
251251+ dest="add_plugins",
252252+ default=[],
253253+ action="append",
254254+ help=f"Plugin to add to {self.attr_path} from Github in the form owner/repo",
255255+ )
256256+ parser.add_argument(
257257+ "--input-names",
258258+ "-i",
259259+ dest="input_file",
260260+ default=self.default_in,
261261+ help="A list of plugins in the form owner/repo",
262262+ )
263263+ parser.add_argument(
264264+ "--out",
265265+ "-o",
266266+ dest="outfile",
267267+ default=self.default_out,
268268+ help="Filename to save generated nix code",
269269+ )
270270+ parser.add_argument(
271271+ "--proc",
272272+ "-p",
273273+ dest="proc",
274274+ type=int,
275275+ default=30,
276276+ help="Number of concurrent processes to spawn.",
277277+ )
278278+ parser.add_argument(
279279+ "--no-commit", "-n", action="store_true", default=False,
280280+ help="Whether to autocommit changes"
281281+ )
282282+ parser.add_argument(
283283+ "--debug", "-d", choices=LOG_LEVELS.keys(),
284284+ default=logging.getLevelName(logging.WARN),
285285+ help="Adjust log level"
286286+ )
287287+ return parser
243288244289245290···272317273318274319def prefetch_plugin(
275275- user: str,
276276- repo_name: str,
277277- branch: str,
278278- alias: Optional[str],
320320+ p: PluginDesc,
279321 cache: "Optional[Cache]" = None,
280322) -> Tuple[Plugin, Dict[str, str]]:
323323+ user, repo_name, branch, alias = p.owner, p.repo, p.branch, p.alias
281324 log.info(f"Fetching last commit for plugin {user}/{repo_name}@{branch}")
282325 repo = Repo(user, repo_name, branch, alias)
283326 commit, date = repo.latest_commit()
···302345303346304347def fetch_plugin_from_pluginline(plugin_line: str) -> Plugin:
305305- plugin, _ = prefetch_plugin(*parse_plugin_line(plugin_line))
348348+ plugin, _ = prefetch_plugin(parse_plugin_line(plugin_line))
306349 return plugin
307350308351···421464422465423466def prefetch(
424424- args: PluginDesc, cache: Cache
467467+ pluginDesc: PluginDesc, cache: Cache
425468) -> Tuple[str, str, Union[Exception, Plugin], dict]:
426426- owner, repo = args.owner, args.repo
469469+ owner, repo = pluginDesc.owner, pluginDesc.repo
427470 try:
428428- plugin, redirect = prefetch_plugin(owner, repo, args.branch, args.alias, cache)
471471+ plugin, redirect = prefetch_plugin(pluginDesc, cache)
429472 cache[plugin.commit] = plugin
430473 return (owner, repo, plugin, redirect)
431474 except Exception as e:
···466509 with open(input_file, "w") as f:
467510 f.writelines(lines)
468511469469-# TODO move to Editor ?
470470-def parse_args(editor: Editor):
471471- parser = argparse.ArgumentParser(
472472- description=(
473473- f"Updates nix derivations for {editor.name} plugins"
474474- f"By default from {editor.default_in} to {editor.default_out}"
475475- )
476476- )
477477- parser.add_argument(
478478- "--add",
479479- dest="add_plugins",
480480- default=[],
481481- action="append",
482482- help=f"Plugin to add to {editor.attr_path} from Github in the form owner/repo",
483483- )
484484- parser.add_argument(
485485- "--input-names",
486486- "-i",
487487- dest="input_file",
488488- default=editor.default_in,
489489- help="A list of plugins in the form owner/repo",
490490- )
491491- parser.add_argument(
492492- "--out",
493493- "-o",
494494- dest="outfile",
495495- default=editor.default_out,
496496- help="Filename to save generated nix code",
497497- )
498498- parser.add_argument(
499499- "--proc",
500500- "-p",
501501- dest="proc",
502502- type=int,
503503- default=30,
504504- help="Number of concurrent processes to spawn.",
505505- )
506506- parser.add_argument(
507507- "--no-commit", "-n", action="store_true", default=False,
508508- help="Whether to autocommit changes"
509509- )
510510- parser.add_argument(
511511- "--debug", "-d", choices=LOG_LEVELS.keys(),
512512- default=logging.getLevelName(logging.WARN),
513513- help="Adjust log level"
514514- )
515515- return parser.parse_args()
516516-517512518513def commit(repo: git.Repo, message: str, files: List[Path]) -> None:
519514 repo.index.add([str(f.resolve()) for f in files])
···547542 return update
548543549544550550-def update_plugins(editor: Editor):
545545+def update_plugins(editor: Editor, args):
551546 """The main entry function of this module. All input arguments are grouped in the `Editor`."""
552547553553- args = parse_args(editor)
554548 log.setLevel(LOG_LEVELS[args.debug])
555555-556549 log.info("Start updating plugins")
557550 nixpkgs_repo = git.Repo(editor.root, search_parent_directories=True)
558551 update = editor.get_update(args.input_file, args.outfile, args.proc)
···581574 if autocommit:
582575 commit(
583576 nixpkgs_repo,
584584- "{editor.attr_path}.{name}: init at {version}".format(
585585- editor=editor.name, name=plugin.normalized_name, version=plugin.version
577577+ "{drv_name}: init at {version}".format(
578578+ drv_name=editor.get_drv_name(plugin.normalized_name),
579579+ version=plugin.version
586580 ),
587581 [args.outfile, args.input_file],
588582 )
···668668 to use wildcards in the <literal>source</literal> argument.
669669 </para>
670670 </listitem>
671671+ </itemizedlist>
672672+ <para>
673673+ <<<<<<< HEAD
674674+ </para>
675675+ <itemizedlist>
671676 <listitem>
672677 <para>
673678 The <literal>openrazer</literal> and
···701706 configures the address and port the web UI is listening, it
702707 defaults to <literal>:9001</literal>. To be able to access the
703708 web UI this port needs to be opened in the firewall.
709709+ </para>
710710+ </listitem>
711711+ <listitem>
712712+ <para>
713713+ The <literal>varnish</literal> package was upgraded from 6.3.x
714714+ to 6.5.x. <literal>varnish60</literal> for the last LTS
715715+ release is also still available.
704716 </para>
705717 </listitem>
706718 </itemizedlist>
+3
nixos/doc/manual/release-notes/rl-2111.section.md
···171171172172- `programs.neovim.runtime` switched to a `linkFarm` internally, making it impossible to use wildcards in the `source` argument.
173173174174+<<<<<<< HEAD
174175- The `openrazer` and `openrazer-daemon` packages as well as the `hardware.openrazer` module now require users to be members of the `openrazer` group instead of `plugdev`. With this change, users no longer need be granted the entire set of `plugdev` group permissions, which can include permissions other than those required by `openrazer`. This is desirable from a security point of view. The setting [`harware.openrazer.users`](options.html#opt-services.hardware.openrazer.users) can be used to add users to the `openrazer` group.
175176176177- The `yambar` package has been split into `yambar` and `yambar-wayland`, corresponding to the xorg and wayland backend respectively. Please switch to `yambar-wayland` if you are on wayland.
···178179- The `services.minio` module gained an additional option `consoleAddress`, that
179180configures the address and port the web UI is listening, it defaults to `:9001`.
180181To be able to access the web UI this port needs to be opened in the firewall.
182182+183183+- The `varnish` package was upgraded from 6.3.x to 6.5.x. `varnish60` for the last LTS release is also still available.
181184182185## Other Notable Changes {#sec-release-21.11-notable-changes}
183186
···4343 IPv6 addresses must be enclosed in square brackets.
4444 Note: this option overrides <literal>addSSL</literal>
4545 and <literal>onlySSL</literal>.
4646+4747+ If you only want to set the addresses manually and not
4848+ the ports, take a look at <literal>listenAddresses</literal>
4649 '';
5050+ };
5151+5252+ listenAddresses = mkOption {
5353+ type = with types; listOf str;
5454+5555+ description = ''
5656+ Listen addresses for this virtual host.
5757+ Compared to <literal>listen</literal> this only sets the addreses
5858+ and the ports are choosen automatically.
5959+6060+ Note: This option overrides <literal>enableIPv6</literal>
6161+ '';
6262+ default = [];
6363+ example = [ "127.0.0.1" "::1" ];
4764 };
48654966 enableACME = mkOption {
···164164 systemd.packages = with pkgs.gnome; [ gdm gnome-session gnome-shell ];
165165 environment.systemPackages = [ pkgs.gnome.adwaita-icon-theme ];
166166167167+ # We dont use the upstream gdm service
168168+ # it has to be disabled since the gdm package has it
169169+ # https://github.com/NixOS/nixpkgs/issues/108672
170170+ systemd.services.gdm.enable = false;
171171+167172 systemd.services.display-manager.wants = [
168173 # Because sd_login_monitor_new requires /run/systemd/machines
169174 "systemd-machined.service"
···7878 'su - test7 -c "SSH_AUTH_SOCK=HOLEY doas env"'
7979 ):
8080 raise Exception("failed to exclude SSH_AUTH_SOCK")
8181+8282+ # Test that the doas setuid wrapper precedes the unwrapped version in PATH after
8383+ # calling doas.
8484+ # The PATH set by doas is defined in
8585+ # ../../pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
8686+ with subtest("recursive calls to doas from subprocesses should succeed"):
8787+ machine.succeed('doas -u test0 sh -c "doas -u test0 true"')
8188 '';
8289 }
8390)
···2828 else "");
2929in stdenv.mkDerivation rec {
3030 pname = "signal-desktop";
3131- version = "5.12.2"; # Please backport all updates to the stable channel.
3131+ version = "5.13.1"; # Please backport all updates to the stable channel.
3232 # All releases have a limited lifetime and "expire" 90 days after the release.
3333 # When releases "expire" the application becomes unusable until an update is
3434 # applied. The expiration date for the current release can be extracted with:
···38383939 src = fetchurl {
4040 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
4141- sha256 = "0z8nphlm3q9gqri6bqh1iaayx5yy0bhrmjb7l7facdkm1aahmaa7";
4141+ sha256 = "0k3gbs6y19vri5n087wc6fdhydkis3h6rhxd3w1j9rhrb5fxjv3q";
4242 };
43434444 nativeBuildInputs = [
···11+{ lib, stdenvNoCC, fetchurl, makeWrapper, perl, installShellFiles }:
22+33+stdenvNoCC.mkDerivation rec {
44+ pname = "listadmin";
55+ version = "2.73";
66+77+ src = fetchurl {
88+ url = "mirror://sourceforge/project/listadmin/${version}/listadmin-${version}.tar.gz";
99+ sha256 = "00333d65ygdbm1hqr4yp2j8vh1cgh3hyfm7iy9y1alf0p0f6aqac";
1010+ };
1111+1212+ buildInputs = [ perl ];
1313+ nativeBuildInputs = [ makeWrapper installShellFiles ];
1414+1515+ # There is a Makefile, but we don’t need it, and it prints errors
1616+ dontBuild = true;
1717+1818+ installPhase = ''
1919+ mkdir -p $out/bin $out/share/man/man1
2020+ install -m 755 listadmin.pl $out/bin/listadmin
2121+ installManPage listadmin.1
2222+2323+ wrapProgram $out/bin/listadmin \
2424+ --prefix PERL5LIB : "${with perl.pkgs; makeFullPerlPath [
2525+ TextReform NetINET6Glue LWPProtocolhttps
2626+ ]}"
2727+ '';
2828+2929+ doInstallCheck = true;
3030+ installCheckPhase = ''
3131+ $out/bin/listadmin --help 2> /dev/null
3232+ '';
3333+3434+ meta = with lib; {
3535+ description = "Command line mailman moderator queue manipulation";
3636+ longDescription = ''
3737+ listadmin is a command line tool to manipulate the queues of messages
3838+ held for moderator approval by mailman. It is designed to keep user
3939+ interaction to a minimum, in theory you could run it from cron to prune
4040+ the queue. It can use the score from a header added by SpamAssassin to
4141+ filter, or it can match specific senders, subjects, or reasons.
4242+ '';
4343+ homepage = "https://sourceforge.net/projects/listadmin/";
4444+ license = licenses.publicDomain;
4545+ platforms = platforms.unix;
4646+ maintainers = with maintainers; [ nomeata ];
4747+ };
4848+}
···11+{ lib, wrapFirefox, gpgme, gnupg }:
22+33+browser:
44+args:
55+66+(wrapFirefox browser ({
77+ libName = "thunderbird";
88+} // args))
99+1010+.overrideAttrs (old: {
1111+ # Thunderbird's native GPG support does not yet support smartcards.
1212+ # The official upstream recommendation is to configure fall back to gnupg
1313+ # using the Thunderbird config `mail.openpgp.allow_external_gnupg`
1414+ # and GPG keys set up; instructions with pictures at:
1515+ # https://anweshadas.in/how-to-use-yubikey-or-any-gpg-smartcard-in-thunderbird-78/
1616+ # For that to work out of the box, it requires `gnupg` on PATH and
1717+ # `gpgme` in `LD_LIBRARY_PATH`; we do this below.
1818+ buildCommand = old.buildCommand + ''
1919+ wrapProgram $out/bin/thunderbird \
2020+ --prefix LD_LIBRARY_PATH ':' "${lib.makeLibraryPath [ gpgme ]}" \
2121+ --prefix PATH ':' "${lib.makeBinPath [ gnupg ]}"
2222+ '';
2323+})
···2233with python.pkgs;
44buildPythonApplication rec {
55- version = "0.3.9";
55+ version = "0.5.0";
66 pname = "nbstripout";
7788 # Mercurial should be added as a build input but because it's a Python
···14141515 src = fetchPypi {
1616 inherit pname version;
1717- sha256 = "b46dddbf78b8b137176bc72729124e378242ef9ce93af63f6e0a8c4850c972e7";
1717+ sha256 = "86ab50136998d62c9fa92478d2eb9ddc4137e51a28568f78fa8f24a6fbb6a7d8";
1818 };
19192020 # for some reason, darwin uses /bin/sh echo native instead of echo binary, so
···6565 EOF
6666 '';
67676868+ # fixupPhase is moving the man to share/man which breaks it because it's a
6969+ # relative symlink.
7070+ postFixup = ''
7171+ ln -nsf ../zulu-11.jdk/Contents/Home/man $out/share/man
7272+ '';
7373+6874 passthru = {
6975 home = jdk;
7076 };
+11-13
pkgs/development/compilers/vlang/default.nix
···11-{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, upx ? null }:
22-33-assert stdenv.hostPlatform.isUnix -> upx != null;
11+{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx }:
4253stdenv.mkDerivation rec {
64 pname = "vlang";
···2523 propagatedBuildInputs = [ glfw freetype openssl ]
2624 ++ lib.optional stdenv.hostPlatform.isUnix upx;
27252828- buildPhase = ''
2929- runHook preBuild
3030- cc -std=gnu11 $CFLAGS -w -o v $vc/v.c -lm $LDFLAGS
3131- # vlang seems to want to write to $HOME/.vmodules,
3232- # so lets give it a writable HOME
3333- HOME=$PWD ./v -prod self
3434- # Exclude thirdparty/vschannel as it is windows-specific.
3535- find thirdparty -path thirdparty/vschannel -prune -o -type f -name "*.c" -execdir cc -std=gnu11 $CFLAGS -w -c {} $LDFLAGS ';'
3636- runHook postBuild
3737- '';
2626+ nativeBuildInputs = [ makeWrapper ];
2727+2828+ makeFlags = [
2929+ "local=1"
3030+ "VC=${vc}"
3131+ # vlang seems to want to write to $HOME/.vmodules , so lets give
3232+ # it a writable HOME
3333+ "HOME=$TMPDIR"
3434+ ];
38353936 installPhase = ''
4037 runHook preInstall
···4340 cp -r {cmd,vlib,thirdparty} $out/lib
4441 mv v $out/lib
4542 ln -s $out/lib/v $out/bin/v
4343+ wrapProgram $out/bin/v --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}
4644 runHook postInstall
4745 '';
4846
···5566buildPythonPackage rec {
77 pname = "celery";
88- version = "5.1.1";
88+ version = "5.1.2";
991010 src = fetchPypi {
1111 inherit pname version;
1212- sha256 = "54436cd97b031bf2e08064223240e2a83d601d9414bcb1b702f94c6c33c29485";
1212+ sha256 = "8d9a3de9162965e97f8e8cc584c67aad83b3f7a267584fa47701ed11c3e0d4b0";
1313 };
14141515 # click is only used for the repl, in most cases this shouldn't impact
···55 # they fix more, because it even has at least one bugs less than 2.7.4.
66 # 2.8.0 does not start properly on linux
77 # They just starting making that 2.8.0 work on linux.
88- name = "egoboo-2.7.3";
88+ pname = "egoboo";
99+ version = "2.7.3";
9101011 src = fetchurl {
1111- url = "mirror://sourceforge/egoboo/${name}.tar.gz";
1212+ url = "mirror://sourceforge/egoboo/egoboo-${version}.tar.gz";
1213 sha256 = "18cjgp9kakrsa90jcb4cl8hhh9k57mi5d1sy5ijjpd3p7zl647hd";
1314 };
1415···2223 # The user will need to have all the files in '.' to run egoboo, with
2324 # writeable controls.txt and setup.txt
2425 installPhase = ''
2525- mkdir -p $out/share/${name}
2626- cp -v game/egoboo $out/share/${name}
2626+ mkdir -p $out/share/egoboo-${version}
2727+ cp -v game/egoboo $out/share/egoboo-${version}
2728 cd ..
2828- cp -v -Rd controls.txt setup.txt players modules basicdat $out/share/${name}
2929+ cp -v -Rd controls.txt setup.txt players modules basicdat $out/share/egoboo-${version}
2930 '';
30313132 buildInputs = [ libGLU libGL SDL SDL_mixer SDL_image SDL_ttf ];
+71
pkgs/games/liberation-circuit/default.nix
···11+{ stdenv, lib, fetchFromGitHub, fetchurl, cmake, git, makeWrapper, allegro5, libGL }:
22+33+stdenv.mkDerivation rec {
44+ pname = "liberation-circuit";
55+ version = "1.3";
66+77+ src = fetchFromGitHub {
88+ owner = "linleyh";
99+ repo = pname;
1010+ rev = "v${version}";
1111+ sha256 = "BAv0wEJw4pK77jV+1bWPHeqyU/u0HtZLBF3ETUoQEAk=";
1212+ };
1313+1414+ patches = [
1515+ # Linux packaging assets
1616+ (fetchurl {
1717+ url = "https://github.com/linleyh/liberation-circuit/commit/72c1f6f4100bd227540aca14a535e7f4ebdeb851.patch";
1818+ sha256 = "0sad1z1lls0hanv88g1q6x5qr4s8f5p42s8j8v55bmwsdc0s5qys";
1919+ })
2020+ ];
2121+2222+ # Hack to make binary diffs work
2323+ prePatch = ''
2424+ function patch {
2525+ git apply --whitespace=nowarn "$@"
2626+ }
2727+ '';
2828+2929+ postPatch = ''
3030+ unset -f patch
3131+ substituteInPlace bin/launcher.sh --replace ./libcirc ./liberation-circuit
3232+ '';
3333+3434+ nativeBuildInputs = [ cmake git makeWrapper ];
3535+ buildInputs = [ allegro5 libGL ];
3636+3737+ cmakeFlags = [
3838+ "-DALLEGRO_LIBRARY=${lib.getDev allegro5}"
3939+ "-DALLEGRO_INCLUDE_DIR=${lib.getDev allegro5}/include"
4040+ ];
4141+4242+ NIX_CFLAGS_LINK = "-lallegro_image -lallegro_primitives -lallegro_color -lallegro_acodec -lallegro_audio -lallegro_dialog -lallegro_font -lallegro_main -lallegro -lm";
4343+ hardeningDisable = [ "format" ];
4444+4545+ installPhase = ''
4646+ runHook preInstall
4747+4848+ mkdir -p $out/opt
4949+ cd ..
5050+ cp -r bin $out/opt/liberation-circuit
5151+ chmod +x $out/opt/liberation-circuit/launcher.sh
5252+ makeWrapper $out/opt/liberation-circuit/launcher.sh $out/bin/liberation-circuit
5353+5454+ install -D linux-packaging/liberation-circuit.desktop $out/share/applications/liberation-circuit.desktop
5555+ install -D linux-packaging/liberation-circuit.appdata.xml $out/share/metainfo/liberation-circuit.appdata.xml
5656+ install -D linux-packaging/icon-256px.png $out/share/pixmaps/liberation-circuit.png
5757+5858+ runHook postInstall
5959+ '';
6060+6161+ meta = with lib; {
6262+ description = "Real-time strategy game with programmable units";
6363+ longDescription = ''
6464+ Escape from a hostile computer system! Harvest data to create an armada of battle-processes to aid your escape! Take command directly and play the game as an RTS, or use the game's built-in editor and compiler to write your own unit AI in a simplified version of C.
6565+ '';
6666+ homepage = "https://linleyh.itch.io/liberation-circuit";
6767+ maintainers = with maintainers; [ angustrau ];
6868+ license = licenses.gpl3Only;
6969+ platforms = platforms.linux;
7070+ };
7171+}
+2-1
pkgs/games/onscripter-en/default.nix
···445566stdenv.mkDerivation {
77- name = "onscripter-en-20110930";
77+ pname = "onscripter-en";
88+ version = "20110930";
89910 src = fetchurl {
1011 # The website is not available now.
···55 version = "1.42";
6677 src = fetchurl {
88- url = "https://www.lcdf.org/type/${pname}-${version}.tar.gz";
88+ url = "https://www.lcdf.org/type/t1utils-${version}.tar.gz";
99 sha256 = "YYd5NbGYcETd/0u5CgUgDKcWRnijVeFwv18aVVbMnyk=";
1010 };
1111···1919 resources from a Macintosh font file or create a Macintosh Type 1 font
2020 file from a PFA or PFB font.
2121 '';
2222- homepage = "http://www.lcdf.org/type/";
2222+ homepage = "https://www.lcdf.org/type/";
2323 # README from tarball says "BSD-like" and points to non-existing LICENSE
2424 # file...
2525 license = "Click"; # MIT with extra clause, https://github.com/kohler/t1utils/blob/master/LICENSE
···473473 mess = mame; # added 2019-10-30
474474 mcgrid = throw "mcgrid has been removed from nixpkgs, as it's not compatible with rivet 3"; # added 2020-05-23
475475 mcomix = throw "mcomix has been removed from nixpkgs, as it's unmaintained; try mcomix3 a Python 3 fork"; # added 2019-12-10, modified 2020-11-25
476476- mirage = throw "mirage has been femoved from nixpkgs, as it's unmaintained"; # added 2019-12-10
476476+ mirage = throw "mirage has been removed from nixpkgs, as it's unmaintained"; # added 2019-12-10
477477+ minergate = throw "minergate has been removed from nixpkgs, because the package is unmaintained and the site has a bad reputation"; # added 2021-08-13
478478+ minergate-cli = throw "minergatecli has been removed from nixpkgs, because the package is unmaintained and the site has a bad reputation"; # added 2021-08-13
477479 mopidy-gmusic = throw "mopidy-gmusic has been removed because Google Play Music was discontinued"; # added 2021-03-07
478480 mopidy-local-images = throw "mopidy-local-images has been removed as it's unmaintained. It's functionality has been merged into the mopidy-local extension."; # added 2020-10-18
479481 mopidy-local-sqlite = throw "mopidy-local-sqlite has been removed as it's unmaintained. It's functionality has been merged into the mopidy-local extension."; # added 2020-10-18
···894896 v8_3_16_14 = throw "v8_3_16_14 was removed in 2019-11-01: no longer referenced by other packages";
895897 valadoc = throw "valadoc was deprecated on 2019-10-10: valadoc was merged into vala 0.38";
896898 vamp = { vampSDK = vamp-plugin-sdk; }; # added 2020-03-26
899899+ varnish62 = throw "varnish62 was removed from nixpkgs, because it is unmaintained upstream. Please switch to a different release."; # 2021-07-26
900900+ varnish63 = throw "varnish63 was removed from nixpkgs, because it is unmaintained upstream. Please switch to a different release."; # 2021-07-26
897901 venus = throw "venus has been removed from nixpkgs, as it's unmaintained"; # added 2021-02-05
898902 vdirsyncerStable = vdirsyncer; # added 2020-11-08, see https://github.com/NixOS/nixpkgs/issues/103026#issuecomment-723428168
899903 vimbWrapper = vimb; # added 2015-01