Unverified Commit 72cbc5fa authored by Guillaume Girol's avatar Guillaume Girol Committed by GitHub
Browse files

nixseparatedebuginfod2: 1.0.1 -> 2.0.0 (#512851)

parents 03f3a96d 6b33c9dc
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
}:
let
  cfg = config.services.nixseparatedebuginfod2;
  url = "127.0.0.1:${toString cfg.port}";
  address = "127.0.0.1:${toString cfg.port}";
in
{
  imports = [
@@ -40,16 +40,16 @@ in
    };
  };
  config = lib.mkIf cfg.enable {
    systemd.services.nixseparatedebuginfod2 = {
    systemd.sockets.nixseparatedebuginfod2 = {
      wantedBy = [ "multi-user.target" ];
      path = [ config.nix.package ];
      socketConfig.ListenStream = [ address ];
    };
    systemd.services.nixseparatedebuginfod2 = {
      serviceConfig = {
        ExecStart = [
          (utils.escapeSystemdExecArgs (
            [
              (lib.getExe cfg.package)
              "--listen-address"
              url
              "--expiration"
              cfg.cacheExpirationDelay
            ]
@@ -59,6 +59,7 @@ in
            ]) cfg.substituters)
          ))
        ];
        Type = "notify";
        Restart = "on-failure";
        CacheDirectory = "nixseparatedebuginfod2";
        DynamicUser = true;
@@ -101,7 +102,7 @@ in
      };
    };

    environment.debuginfodServers = [ "http://${url}" ];
    environment.debuginfodServers = [ "http://${address}" ];

  };
}
+1 −2
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@
    start_all()
    cache.wait_for_unit("nginx.service")
    cache.wait_for_open_port(80)
    machine.wait_for_unit("nixseparatedebuginfod2.service")
    machine.wait_for_open_port(1949)
    machine.wait_for_unit("nixseparatedebuginfod2.socket")

    with subtest("check that the binary cache works"):
      machine.succeed("nix-store --extra-substituters http://cache --option require-sigs false -r ${pkgs.sl}")
+16 −3
Original line number Diff line number Diff line
@@ -10,24 +10,30 @@
  elfutils,
  nix,
  nixosTests,
  systemd,
  util-linux,
  cacert,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "nixseparatedebuginfod2";
  version = "1.0.1";
  version = "2.0.0";

  src = fetchFromGitHub {
    owner = "symphorien";
    repo = "nixseparatedebuginfod2";
    tag = "v${finalAttrs.version}";
    hash = "sha256-INY9mLJ+7i3BoShqFZMELm9aXiDbZkuLyokgm42kEbo=";
    hash = "sha256-D327Pz3oHOHgfekXnDRQ0l+GrIcFUK1zcIqzR2Y3zqU=";
  };

  cargoHash = "sha256-6JyC0CLGnkbQWp8l27DXZ04Gt0nsNNSBFfcvAQtllE4=";
  cargoHash = "sha256-iAhm54jb+5Nv/XG6GYpoEgPjYmBTHvEnnmynFF8D8n4=";

  buildInputs = [
    libarchive
    openssl
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [
    systemd
  ];

  nativeBuildInputs = [ pkg-config ];
@@ -37,6 +43,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
    bubblewrap
    elfutils
    nix
    util-linux
    cacert
  ];

  # disable systemd feature on non linux
  cargoBuildFlags = lib.optionals (!stdenv.hostPlatform.isLinux) [
    "--no-default-features"
  ];

  env.OPENSSL_NO_VENDOR = "1";