···9{ config, lib, options, pkgs, ... }:
1011let
12- inherit (lib) mkOption mkIf types filterAttrs literalExample mkRenamedOptionModule;
000000001314 cfg =
15 config.services.hercules-ci-agent;
···77 };
78 };
79080 checkNix =
81 if !cfg.checkNix
82 then ""
83- else if lib.versionAtLeast config.nix.package.version "2.4.0"
84 then ""
85 else pkgs.stdenv.mkDerivation {
86 name = "hercules-ci-check-system-nix-src";
···88 configurePhase = ":";
89 buildPhase = ''
90 echo "Checking in-memory pathInfoCache expiry"
91- if ! grep 'struct PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then
92 cat 1>&2 <<EOF
9394 You are deploying Hercules CI Agent on a system with an incompatible
95- nix-daemon. Please
96- - either upgrade Nix to version 2.4.0 (when released),
97- - or set option services.hercules-ci-agent.patchNix = true;
98- - or set option nix.package to a build of Nix 2.3 with this patch applied:
99- https://github.com/NixOS/nix/pull/3405
100-101- The patch is required for Nix-daemon clients that expect a change in binary
102- cache contents while running, like the agent's evaluator. Without it, import
103- from derivation will fail if your cluster has more than one machine.
104- We are conservative with changes to the overall system, which is why we
105- keep changes to a minimum and why we ask for confirmation in the form of
106- services.hercules-ci-agent.patchNix = true before applying.
107-108 EOF
109 exit 1
110 fi
···112 installPhase = "touch $out";
113 };
114115- patchedNix = lib.mkIf (!lib.versionAtLeast pkgs.nix.version "2.4.0") (
116- if lib.versionAtLeast pkgs.nix.version "2.4pre"
117- then lib.warn "Hercules CI Agent module will not patch 2.4 pre-release. Make sure it includes (equivalently) PR #3043, commit d048577909 or is no older than 2020-03-13." pkgs.nix
118- else pkgs.nix.overrideAttrs (
119- o: {
120- patches = (o.patches or []) ++ [ backportNix3398 ];
121- }
122- )
123- );
124-125- backportNix3398 = pkgs.fetchurl {
126- url = "https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/hercules-ci-agent-0.7.3/for-upstream/issue-3398-path-info-cache-ttls-backport-2.3.patch";
127- sha256 = "0jfckqjir9il2il7904yc1qyadw366y7xqzg81sp9sl3f1pw70ib";
128- };
129in
130{
131 imports = [
132 (mkRenamedOptionModule ["services" "hercules-ci-agent" "extraOptions"] ["services" "hercules-ci-agent" "settings"])
133 (mkRenamedOptionModule ["services" "hercules-ci-agent" "baseDirectory"] ["services" "hercules-ci-agent" "settings" "baseDirectory"])
134 (mkRenamedOptionModule ["services" "hercules-ci-agent" "concurrentTasks"] ["services" "hercules-ci-agent" "settings" "concurrentTasks"])
0135 ];
136137 options.services.hercules-ci-agent = {
···145 continuous integation service that is centered around Nix.
146147 Support is available at <link xlink:href="mailto:help@hercules-ci.com">help@hercules-ci.com</link>.
148- '';
149- };
150- patchNix = mkOption {
151- type = types.bool;
152- default = false;
153- description = ''
154- Fix Nix 2.3 cache path metadata caching behavior. Has the effect of <literal>nix.package = patch pkgs.nix;</literal>
155-156- This option will be removed when Hercules CI Agent moves to Nix 2.4 (upcoming Nix release).
157 '';
158 };
159 checkNix = mkOption {
···206 # even shortly after the previous lookup. This *also* applies to the daemon.
207 narinfo-cache-negative-ttl = 0
208 '';
209- nix.package = mkIf cfg.patchNix patchedNix;
210 services.hercules-ci-agent.tomlFile =
211 format.generate "hercules-ci-agent.toml" cfg.settings;
212 };
···9{ config, lib, options, pkgs, ... }:
1011let
12+ inherit (lib)
13+ filterAttrs
14+ literalExample
15+ mkIf
16+ mkOption
17+ mkRemovedOptionModule
18+ mkRenamedOptionModule
19+ types
20+ ;
2122 cfg =
23 config.services.hercules-ci-agent;
···85 };
86 };
8788+ # TODO (2022) remove
89 checkNix =
90 if !cfg.checkNix
91 then ""
92+ else if lib.versionAtLeast config.nix.package.version "2.3.10"
93 then ""
94 else pkgs.stdenv.mkDerivation {
95 name = "hercules-ci-check-system-nix-src";
···97 configurePhase = ":";
98 buildPhase = ''
99 echo "Checking in-memory pathInfoCache expiry"
100+ if ! grep 'PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then
101 cat 1>&2 <<EOF
102103 You are deploying Hercules CI Agent on a system with an incompatible
104+ nix-daemon. Please make sure nix.package is set to a Nix version of at
105+ least 2.3.10 or a master version more recent than Mar 12, 2020.
00000000000106 EOF
107 exit 1
108 fi
···110 installPhase = "touch $out";
111 };
11200000000000000113in
114{
115 imports = [
116 (mkRenamedOptionModule ["services" "hercules-ci-agent" "extraOptions"] ["services" "hercules-ci-agent" "settings"])
117 (mkRenamedOptionModule ["services" "hercules-ci-agent" "baseDirectory"] ["services" "hercules-ci-agent" "settings" "baseDirectory"])
118 (mkRenamedOptionModule ["services" "hercules-ci-agent" "concurrentTasks"] ["services" "hercules-ci-agent" "settings" "concurrentTasks"])
119+ (mkRemovedOptionModule ["services" "hercules-ci-agent" "patchNix"] "Nix versions packaged in this version of Nixpkgs don't need a patched nix-daemon to work correctly in Hercules CI Agent clusters.")
120 ];
121122 options.services.hercules-ci-agent = {
···130 continuous integation service that is centered around Nix.
131132 Support is available at <link xlink:href="mailto:help@hercules-ci.com">help@hercules-ci.com</link>.
000000000133 '';
134 };
135 checkNix = mkOption {
···182 # even shortly after the previous lookup. This *also* applies to the daemon.
183 narinfo-cache-negative-ttl = 0
184 '';
0185 services.hercules-ci-agent.tomlFile =
186 format.generate "hercules-ci-agent.toml" cfg.settings;
187 };
···1-diff --git a/setup.py b/setup.py
2-index 8e1c220..45297b6 100644
3---- a/setup.py
4-+++ b/setup.py
5-@@ -25,20 +25,6 @@ class CustomBuildExtCommand(build_ext):
6- install_h3(h3_version)
7-8-9--# Tested with wheel v0.29.0
10--class BinaryDistribution(Distribution):
11-- def __init__(self, attrs=None):
12-- Distribution.__init__(self, attrs)
13-- # The values used for the name and sources in the Extension below are
14-- # not important, because we override the build_ext command above.
15-- # The normal C extension building logic is never invoked, and is
16-- # replaced with our own custom logic. However, ext_modules cannot be
17-- # empty, because this signals to other parts of distutils that our
18-- # package contains C extensions and thus needs to be built for
19-- # different platforms separately.
20-- self.ext_modules = [Extension('h3c', [])]
21--
22--
23- long_description = open('README.rst').read()
24-25- setup(
26-@@ -52,14 +38,10 @@ setup(
27- url='https://github.com/uber/h3-py.git',
28- packages=find_packages(exclude=['tests', 'tests.*']),
29- install_requires=[],
30-- cmdclass={
31-- 'build_ext': CustomBuildExtCommand,
32-- },
33- package_data={
34- 'h-py':
35- ['out/*.dylib' if platform.system() == 'Darwin' else (
36- 'out/*.dll' if platform.system() == 'Windows' else
37- 'out/*.so.*')]
38- },
39-- license='Apache License 2.0',
40-- distclass=BinaryDistribution)
41-+ license='Apache License 2.0')
···1+{ stdenv, lib, fetchzip, substituteAll, bash, jre }:
2+3+stdenv.mkDerivation rec {
4+ pname = "bonnmotion";
5+ version = "3.0.1";
6+7+ src = fetchzip {
8+ url = "https://sys.cs.uos.de/bonnmotion/src/bonnmotion-${version}.zip";
9+ sha256 = "16bjgr0hy6an892m5r3x9yq6rqrl11n91f9rambq5ik1cxjqarxw";
10+ };
11+12+ patches = [
13+ # The software has a non-standard install bash script which kind of works.
14+ # However, to make it fully functional, the automatically detection of the
15+ # program paths must be substituted with full paths.
16+ (substituteAll {
17+ src = ./install.patch;
18+ inherit bash jre;
19+ })
20+ ];
21+22+ installPhase = ''
23+ runHook preInstall
24+25+ ./install
26+27+ mkdir -p $out/bin $out/share/bonnmotion
28+ cp -r ./classes ./lib $out/share/bonnmotion/
29+ cp ./bin/bm $out/bin/
30+31+ substituteInPlace $out/bin/bm \
32+ --replace /build/source $out/share/bonnmotion
33+34+ runHook postInstall
35+ '';
36+37+ meta = with lib; {
38+ description = "A mobility scenario generation and analysis tool";
39+ longDescription = ''
40+ BonnMotion is a Java software which creates and analyzes mobility
41+ scenarios and is most commonly used as a tool for the investigation of
42+ mobile ad hoc network characteristics. The scenarios can also be exported
43+ for several network simulators, such as ns-2, ns-3, GloMoSim/QualNet,
44+ COOJA, MiXiM, and ONE.
45+ '';
46+ homepage = "https://sys.cs.uos.de/bonnmotion/";
47+ license = licenses.gpl2Plus;
48+ maintainers = with maintainers; [ oxzi ];
49+ };
50+}
···1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, autoreconfHook
5+}:
6+7+stdenv.mkDerivation rec {
8+ pname = "robodoc";
9+ version = "4.99.44";
10+11+ src = fetchFromGitHub {
12+ owner = "gumpu";
13+ repo = "ROBODoc";
14+ rev = "v${version}";
15+ sha256 = "l3prSdaGhOvXmZfCPbsZJNocO7y20zJjLQpajRTJOqE=";
16+ };
17+18+ nativeBuildInputs = [ autoreconfHook ];
19+20+ hardeningDisable = [ "format" ];
21+22+ meta = with lib; {
23+ homepage = "https://github.com/gumpu/ROBODoc";
24+ description = "Documentation Extraction Tool";
25+ longDescription = ''
26+ ROBODoc is program documentation tool. The idea is to include for every
27+ function or procedure a standard header containing all sorts of
28+ information about the procedure or function. ROBODoc extracts these
29+ headers from the source file and puts them in a separate
30+ autodocs-file. ROBODoc thus allows you to include the program
31+ documentation in the source code and avoid having to maintain two separate
32+ documents. Or as Petteri puts it: "robodoc is very useful - especially for
33+ programmers who don't like writing documents with Word or some other
34+ strange tool."
35+36+ ROBODoc can format the headers in a number of different formats: HTML,
37+ RTF, LaTeX, or XML DocBook. In HTML mode it can generate cross links
38+ between headers. You can even include parts of your source code.
39+40+ ROBODoc works with many programming languages: For instance C, Pascal,
41+ Shell Scripts, Assembler, COBOL, Occam, Postscript, Forth, Tcl/Tk, C++,
42+ Java -- basically any program in which you can use remarks/comments.
43+ '';
44+ license = with licenses; gpl3Plus;
45+ maintainers = with maintainers; [ AndersonTorres ];
46+ platforms = with platforms; all;
47+ };
48+}