···99{ config, lib, options, pkgs, ... }:
10101111let
1212- inherit (lib) mkOption mkIf types filterAttrs literalExample mkRenamedOptionModule;
1212+ inherit (lib)
1313+ filterAttrs
1414+ literalExample
1515+ mkIf
1616+ mkOption
1717+ mkRemovedOptionModule
1818+ mkRenamedOptionModule
1919+ types
2020+ ;
13211422 cfg =
1523 config.services.hercules-ci-agent;
···7785 };
7886 };
79878888+ # TODO (2022) remove
8089 checkNix =
8190 if !cfg.checkNix
8291 then ""
8383- else if lib.versionAtLeast config.nix.package.version "2.4.0"
9292+ else if lib.versionAtLeast config.nix.package.version "2.3.10"
8493 then ""
8594 else pkgs.stdenv.mkDerivation {
8695 name = "hercules-ci-check-system-nix-src";
···8897 configurePhase = ":";
8998 buildPhase = ''
9099 echo "Checking in-memory pathInfoCache expiry"
9191- if ! grep 'struct PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then
100100+ if ! grep 'PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then
92101 cat 1>&2 <<EOF
9310294103 You are deploying Hercules CI Agent on a system with an incompatible
9595- nix-daemon. Please
9696- - either upgrade Nix to version 2.4.0 (when released),
9797- - or set option services.hercules-ci-agent.patchNix = true;
9898- - or set option nix.package to a build of Nix 2.3 with this patch applied:
9999- https://github.com/NixOS/nix/pull/3405
100100-101101- The patch is required for Nix-daemon clients that expect a change in binary
102102- cache contents while running, like the agent's evaluator. Without it, import
103103- from derivation will fail if your cluster has more than one machine.
104104- We are conservative with changes to the overall system, which is why we
105105- keep changes to a minimum and why we ask for confirmation in the form of
106106- services.hercules-ci-agent.patchNix = true before applying.
107107-104104+ nix-daemon. Please make sure nix.package is set to a Nix version of at
105105+ least 2.3.10 or a master version more recent than Mar 12, 2020.
108106 EOF
109107 exit 1
110108 fi
···112110 installPhase = "touch $out";
113111 };
114112115115- patchedNix = lib.mkIf (!lib.versionAtLeast pkgs.nix.version "2.4.0") (
116116- if lib.versionAtLeast pkgs.nix.version "2.4pre"
117117- 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
118118- else pkgs.nix.overrideAttrs (
119119- o: {
120120- patches = (o.patches or []) ++ [ backportNix3398 ];
121121- }
122122- )
123123- );
124124-125125- backportNix3398 = pkgs.fetchurl {
126126- 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";
127127- sha256 = "0jfckqjir9il2il7904yc1qyadw366y7xqzg81sp9sl3f1pw70ib";
128128- };
129113in
130114{
131115 imports = [
132116 (mkRenamedOptionModule ["services" "hercules-ci-agent" "extraOptions"] ["services" "hercules-ci-agent" "settings"])
133117 (mkRenamedOptionModule ["services" "hercules-ci-agent" "baseDirectory"] ["services" "hercules-ci-agent" "settings" "baseDirectory"])
134118 (mkRenamedOptionModule ["services" "hercules-ci-agent" "concurrentTasks"] ["services" "hercules-ci-agent" "settings" "concurrentTasks"])
119119+ (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.")
135120 ];
136121137122 options.services.hercules-ci-agent = {
···145130 continuous integation service that is centered around Nix.
146131147132 Support is available at <link xlink:href="mailto:help@hercules-ci.com">help@hercules-ci.com</link>.
148148- '';
149149- };
150150- patchNix = mkOption {
151151- type = types.bool;
152152- default = false;
153153- description = ''
154154- Fix Nix 2.3 cache path metadata caching behavior. Has the effect of <literal>nix.package = patch pkgs.nix;</literal>
155155-156156- This option will be removed when Hercules CI Agent moves to Nix 2.4 (upcoming Nix release).
157133 '';
158134 };
159135 checkNix = mkOption {
···206182 # even shortly after the previous lookup. This *also* applies to the daemon.
207183 narinfo-cache-negative-ttl = 0
208184 '';
209209- nix.package = mkIf cfg.patchNix patchedNix;
210185 services.hercules-ci-agent.tomlFile =
211186 format.generate "hercules-ci-agent.toml" cfg.settings;
212187 };
···11-diff --git a/setup.py b/setup.py
22-index 8e1c220..45297b6 100644
33---- a/setup.py
44-+++ b/setup.py
55-@@ -25,20 +25,6 @@ class CustomBuildExtCommand(build_ext):
66- install_h3(h3_version)
77-88-99--# Tested with wheel v0.29.0
1010--class BinaryDistribution(Distribution):
1111-- def __init__(self, attrs=None):
1212-- Distribution.__init__(self, attrs)
1313-- # The values used for the name and sources in the Extension below are
1414-- # not important, because we override the build_ext command above.
1515-- # The normal C extension building logic is never invoked, and is
1616-- # replaced with our own custom logic. However, ext_modules cannot be
1717-- # empty, because this signals to other parts of distutils that our
1818-- # package contains C extensions and thus needs to be built for
1919-- # different platforms separately.
2020-- self.ext_modules = [Extension('h3c', [])]
2121--
2222--
2323- long_description = open('README.rst').read()
2424-2525- setup(
2626-@@ -52,14 +38,10 @@ setup(
2727- url='https://github.com/uber/h3-py.git',
2828- packages=find_packages(exclude=['tests', 'tests.*']),
2929- install_requires=[],
3030-- cmdclass={
3131-- 'build_ext': CustomBuildExtCommand,
3232-- },
3333- package_data={
3434- 'h-py':
3535- ['out/*.dylib' if platform.system() == 'Darwin' else (
3636- 'out/*.dll' if platform.system() == 'Windows' else
3737- 'out/*.so.*')]
3838- },
3939-- license='Apache License 2.0',
4040-- distclass=BinaryDistribution)
4141-+ license='Apache License 2.0')
···11+{ stdenv, lib, fetchzip, substituteAll, bash, jre }:
22+33+stdenv.mkDerivation rec {
44+ pname = "bonnmotion";
55+ version = "3.0.1";
66+77+ src = fetchzip {
88+ url = "https://sys.cs.uos.de/bonnmotion/src/bonnmotion-${version}.zip";
99+ sha256 = "16bjgr0hy6an892m5r3x9yq6rqrl11n91f9rambq5ik1cxjqarxw";
1010+ };
1111+1212+ patches = [
1313+ # The software has a non-standard install bash script which kind of works.
1414+ # However, to make it fully functional, the automatically detection of the
1515+ # program paths must be substituted with full paths.
1616+ (substituteAll {
1717+ src = ./install.patch;
1818+ inherit bash jre;
1919+ })
2020+ ];
2121+2222+ installPhase = ''
2323+ runHook preInstall
2424+2525+ ./install
2626+2727+ mkdir -p $out/bin $out/share/bonnmotion
2828+ cp -r ./classes ./lib $out/share/bonnmotion/
2929+ cp ./bin/bm $out/bin/
3030+3131+ substituteInPlace $out/bin/bm \
3232+ --replace /build/source $out/share/bonnmotion
3333+3434+ runHook postInstall
3535+ '';
3636+3737+ meta = with lib; {
3838+ description = "A mobility scenario generation and analysis tool";
3939+ longDescription = ''
4040+ BonnMotion is a Java software which creates and analyzes mobility
4141+ scenarios and is most commonly used as a tool for the investigation of
4242+ mobile ad hoc network characteristics. The scenarios can also be exported
4343+ for several network simulators, such as ns-2, ns-3, GloMoSim/QualNet,
4444+ COOJA, MiXiM, and ONE.
4545+ '';
4646+ homepage = "https://sys.cs.uos.de/bonnmotion/";
4747+ license = licenses.gpl2Plus;
4848+ maintainers = with maintainers; [ oxzi ];
4949+ };
5050+}
···11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+, autoreconfHook
55+}:
66+77+stdenv.mkDerivation rec {
88+ pname = "robodoc";
99+ version = "4.99.44";
1010+1111+ src = fetchFromGitHub {
1212+ owner = "gumpu";
1313+ repo = "ROBODoc";
1414+ rev = "v${version}";
1515+ sha256 = "l3prSdaGhOvXmZfCPbsZJNocO7y20zJjLQpajRTJOqE=";
1616+ };
1717+1818+ nativeBuildInputs = [ autoreconfHook ];
1919+2020+ hardeningDisable = [ "format" ];
2121+2222+ meta = with lib; {
2323+ homepage = "https://github.com/gumpu/ROBODoc";
2424+ description = "Documentation Extraction Tool";
2525+ longDescription = ''
2626+ ROBODoc is program documentation tool. The idea is to include for every
2727+ function or procedure a standard header containing all sorts of
2828+ information about the procedure or function. ROBODoc extracts these
2929+ headers from the source file and puts them in a separate
3030+ autodocs-file. ROBODoc thus allows you to include the program
3131+ documentation in the source code and avoid having to maintain two separate
3232+ documents. Or as Petteri puts it: "robodoc is very useful - especially for
3333+ programmers who don't like writing documents with Word or some other
3434+ strange tool."
3535+3636+ ROBODoc can format the headers in a number of different formats: HTML,
3737+ RTF, LaTeX, or XML DocBook. In HTML mode it can generate cross links
3838+ between headers. You can even include parts of your source code.
3939+4040+ ROBODoc works with many programming languages: For instance C, Pascal,
4141+ Shell Scripts, Assembler, COBOL, Occam, Postscript, Forth, Tcl/Tk, C++,
4242+ Java -- basically any program in which you can use remarks/comments.
4343+ '';
4444+ license = with licenses; gpl3Plus;
4545+ maintainers = with maintainers; [ AndersonTorres ];
4646+ platforms = with platforms; all;
4747+ };
4848+}