Commit 335fb5e7e27b

Vincent Demeester <vincent@sbr.pm>
2018-12-01 14:26:18
pkgs: remove ape, cni* and stellar packages…
… they all moved to nur 👼 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 9ad1d1f
machine/honshu.nix
@@ -59,7 +59,7 @@ vincent@synodine.local:/volume1/backup/drive/ /run/media/vincent/Toshito/backup/
     serviceConfig = {
       Type = "oneshot";
       User = "vincent";
-      ExecStart = "${pkgs.ape}/bin/ape up /home/vincent/var/mirrors/";
+      ExecStart = "${pkgs.nur.repos.vdemeester.ape}/bin/ape up /home/vincent/var/mirrors/";
       Environment = "PATH=/run/current-system/sw/bin/";
     };
   };
modules/profiles/containerd.nix
@@ -22,15 +22,24 @@ in
         description = "runc package to be used";
         type = types.package;
       };
+      cniPackage = mkOption {
+        default = pkgs.nur.repos.vdemeester.cni;
+        description = "cni package to be used";
+        type = types.package;
+      };
+      cniPluginsPackage = mkOption {
+        default = pkgs.nur.repos.vdemeester.cni-plugins;
+        description = "cni-plugins package to be used";
+        type = types.package;
+      };
     };
   };
   config = mkIf cfg.enable {
     environment.systemPackages = with pkgs; [
-      cni
-      cni-plugins
+      cfg.cniPackage
+      cfg.cniPluginsPackage
       cfg.package
       cfg.runcPackage
-      stellar
     ];
     virtualisation = {
       containerd = {
modules/programs/podman.nix
@@ -33,6 +33,16 @@ in
         description = "conmon package to be used";
         type = types.package;
       };
+      cniPackage = mkOption {
+        default = pkgs.nur.repos.vdemeester.cni;
+        description = "cni package to be used";
+        type = types.package;
+      };
+      cniPluginsPackage = mkOption {
+        default = pkgs.nur.repos.vdemeester.cni-plugins;
+        description = "cni-plugins package to be used";
+        type = types.package;
+      };
     };
   };
 
@@ -42,7 +52,7 @@ in
       image_default_transport = "docker://"
       runtime_path = ["${cfg.runcPackage}/bin/runc"]
       conmon_path = ["${cfg.conmonPackage}/bin/conmon"]
-      cni_plugin_dir = ["${pkgs.cni-plugins}/bin/"]
+      cni_plugin_dir = ["${cfg.cniPluginsPackage}/bin/"]
       cgroup_manager = "systemd"
       cni_config_dir = "/etc/cni/net.d/"
       cni_default_network = "podman"
overlays/sbr.overlay.nix
@@ -1,20 +1,8 @@
 self: super: {
-  ape = import ../pkgs/ape {
-    inherit (self) stdenv lib buildGoPackage fetchFromGitHub;
-  };
   vrsync = import ../pkgs/vrsync {
     inherit (self) stdenv lib;
   };
   vde-thinkpad = import ../pkgs/vde-thinkpad {
     inherit (self) stdenv lib;
   };
-  cni = import ../pkgs/cni {
-    inherit (self) stdenv fetchFromGitHub go;
-  };
-  cni-plugins = import ../pkgs/cni/plugins.nix {
-    inherit (self) stdenv lib fetchFromGitHub go;
-  };
-  stellar = import ../pkgs/stellar {
-    inherit (self) stdenv lib fetchFromGitHub removeReferencesTo go;
-  };
 }
pkgs/ape/default.nix
@@ -1,22 +0,0 @@
-{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
-
-buildGoPackage rec {
-  name = "ape-${version}";
-  version = "0.1.1";
-  rev = "v${version}";
-
-  goPackagePath = "github.com/vdemeester/ape";
-
-  src = fetchFromGitHub {
-    inherit rev;
-    owner = "vdemeester";
-    repo = "ape";
-    sha256 = "0gz329a9ym4yyh9m7c563axaa833gdhh8xfr8a521djzh5snynsq";
-  };
-
-  meta = {
-    description = "a git mirror *upstream* updater ";
-    homepage = "https://github.com/vdemeester/ape";
-    licence = lib.licenses.asl20;
-  };
-}
pkgs/cni/default.nix
@@ -1,33 +0,0 @@
-{ stdenv, fetchFromGitHub, go }:
-
-stdenv.mkDerivation rec {
-  name = "cni-${version}";
-  version = "0.6.0";
-
-  src = fetchFromGitHub {
-    owner = "containernetworking";
-    repo = "cni";
-    rev = "v${version}";
-    sha256 = "00ajs2r5r2z3l0vqwxrcwhjfc9px12qbcv5vnvs2mdipvvls1y2y";
-  };
-
-  buildInputs = [ go ];
-
-  buildPhase = ''
-    patchShebangs build.sh
-    ./build.sh
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin
-    mv bin/cnitool $out/bin
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Container Network Interface - networking for Linux containers";
-    license = licenses.asl20;
-    homepage = https://github.com/containernetworking/cni;
-    maintainers = with maintainers; [offline];
-    platforms = [ "x86_64-linux" ];
-  };
-}
pkgs/cni/plugins.nix
@@ -1,33 +0,0 @@
-{ stdenv, lib, fetchFromGitHub, go }:
-
-stdenv.mkDerivation rec {
-  name = "cni-plugins-${version}";
-  version = "0.7.3";
-
-  src = fetchFromGitHub {
-    owner = "containernetworking";
-    repo = "plugins";
-    rev = "v${version}";
-    sha256 = "1saaszzxy4x3jkqd9ac6cphmzfim7x84h28c9i7az46px40blzm1";
-  };
-
-  buildInputs = [ go ];
-
-  buildPhase = ''
-    patchShebangs build.sh
-    ./build.sh
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin
-    mv bin/* $out/bin
-  '';
-
-  meta = with lib; {
-    description = "Some standard networking plugins, maintained by the CNI team";
-    homepage = https://github.com/containernetworking/plugins;
-    license = licenses.asl20;
-    platforms = [ "x86_64-linux" ];
-    maintainers = with maintainers; [ cstrahan ];
-  };
-}
pkgs/stellar/default.nix
@@ -1,51 +0,0 @@
-{ stdenv, lib, fetchFromGitHub, removeReferencesTo, go}:
-
-stdenv.mkDerivation rec {
-  name = "stellar-${version}";
-  version = "0.1.0";
-  commit = "92a8e36";
-  #commit = "ae539df";
-  #rev = "v${version}";
-  rev = "7f1ebfb50c282411295cbf1f52d3668551a705a8";
-
-  src = fetchFromGitHub {
-    inherit rev;
-    #owner = "ehazlett";
-    #repo = "stellar";
-    owner = "vdemeester";
-    repo = "stellar";
-    sha256 = "0yhzak7rs8v07jp9nk3212d55j34np7d6dvw7d8yx4h1azm1cv60";
-  };
-
-  makeFlags = ["COMMIT=${commit}"];
-
-  buildInputs = [ removeReferencesTo go];
-
-  preConfigure = ''
-    # Extract the source
-    cd "$NIX_BUILD_TOP"
-    mkdir -p "go/src/github.com/ehazlett"
-    mv "$sourceRoot" "go/src/github.com/ehazlett/stellar"
-    export GOPATH=$NIX_BUILD_TOP/go:$GOPATH
-  '';
-
-  preBuild = ''
-    cd go/src/github.com/ehazlett/stellar
-    patchShebangs .
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp bin/* $out/bin
-  '';
-
-  preFixup = ''
-    find $out -type f -exec remove-references-to -t ${go} '{}' +
-  '';
-
-  meta = {
-    description = "Simplified Container Runtime Cluster";
-    homepage = "https://github.com/ehazlett/stellar";
-    licence = lib.licenses.mit;
-  };
-}
pkgs/default.nix
@@ -4,22 +4,10 @@ let
   pkgs = import <nixpkgs> { inherit system; };
 in
 rec {
-  ape = import ./ape {
-    inherit (pkgs) stdenv lib buildGoPackage fetchFromGitHub;
-  };
   vrsync = import ./vrsync {
     inherit (pkgs) stdenv lib;
   };
   vde-thinkpad = import ./vde-thinkpad {
     inherit (pkgs) stdenv lib;
   };
-  cni = import ./cni {
-    inherit (pkgs) stdenv fetchFromGitHub go;
-  };
-  cni-plugins = import ./cni/plugins.nix {
-    inherit (pkgs) stdenv lib fetchFromGitHub go;
-  };
-  stellar = import ./stellar {
-    inherit (pkgs) stdenv lib fetchFromGitHub removeReferencesTo go;
-  };
 }