This commit is contained in:
		
							
								
								
									
										40
									
								
								.drone.jsonnet
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								.drone.jsonnet
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | ||||
| local Pipeline(channel) = { | ||||
|   kind: "pipeline", | ||||
|   type: "docker", | ||||
|   name: channel, | ||||
|   environment: { | ||||
|     NUR_REPO: "xeals", | ||||
|     // NIX_PATH: "nixpkgs=channel:" + channel, | ||||
|     CACHIX_CACHE: "xeals", | ||||
|     CACHIX_SIGNING_KEY: { from_secret: "cachix_key" }, | ||||
|   }, | ||||
|   steps: [ | ||||
|     { | ||||
|       name: "build", | ||||
|       image: "nixos/nix", | ||||
|       commands: [ | ||||
|         "nix-channel --add https://nixos.org/channels/" + channel + " nixos", | ||||
|         "nix-channel --update", | ||||
|         "nix-build ci.nix -A buildOutputs", | ||||
|         "nix eval -f default.nix 'lib'", | ||||
|         "nix eval -f default.nix 'modules'", | ||||
|         "nix eval -f default.nix 'overlays'" | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       name: "deploy", | ||||
|       image: "nixpkgs/cachix", | ||||
|       commands: [ | ||||
|         'nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}"'//, | ||||
|         // 'if [[ "cron" != "${DRONE_BUILD_EVENT}" && -z "${DRONE_PULL_REQUEST}" && "master" = "${DRONE_BRANCH}" ]]; then | ||||
|         //   curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi' | ||||
|       ] | ||||
|     } | ||||
|   ] | ||||
| }; | ||||
|  | ||||
| [ | ||||
|   Pipeline("nixpkgs-unstable"), | ||||
|   Pipeline("nixos-unstable"), | ||||
|   Pipeline("nixos-20.03"), | ||||
| ] | ||||
							
								
								
									
										76
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,76 @@ | ||||
| --- | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: nixpkgs-unstable | ||||
|  | ||||
| platform: | ||||
|   os: linux | ||||
|   arch: amd64 | ||||
|  | ||||
| steps: | ||||
| - name: build | ||||
|   image: nixos/nix | ||||
|   commands: | ||||
|   - nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixos | ||||
|   - nix-channel --update | ||||
|   - nix-build ci.nix -A buildOutputs | ||||
|   - nix eval -f default.nix 'lib' | ||||
|   - nix eval -f default.nix 'modules' | ||||
|   - nix eval -f default.nix 'overlays' | ||||
|  | ||||
| - name: deploy | ||||
|   image: nixpkgs/cachix | ||||
|   commands: | ||||
|   - nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}" | ||||
|  | ||||
| --- | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: nixos-unstable | ||||
|  | ||||
| platform: | ||||
|   os: linux | ||||
|   arch: amd64 | ||||
|  | ||||
| steps: | ||||
| - name: build | ||||
|   image: nixos/nix | ||||
|   commands: | ||||
|   - nix-channel --add https://nixos.org/channels/nixos-unstable nixos | ||||
|   - nix-channel --update | ||||
|   - nix-build ci.nix -A buildOutputs | ||||
|   - nix eval -f default.nix 'lib' | ||||
|   - nix eval -f default.nix 'modules' | ||||
|   - nix eval -f default.nix 'overlays' | ||||
|  | ||||
| - name: deploy | ||||
|   image: nixpkgs/cachix | ||||
|   commands: | ||||
|   - nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}" | ||||
|  | ||||
| --- | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: nixos-20.03 | ||||
|  | ||||
| platform: | ||||
|   os: linux | ||||
|   arch: amd64 | ||||
|  | ||||
| steps: | ||||
| - name: build | ||||
|   image: nixos/nix | ||||
|   commands: | ||||
|   - nix-channel --add https://nixos.org/channels/nixos-20.03 nixos | ||||
|   - nix-channel --update | ||||
|   - nix-build ci.nix -A buildOutputs | ||||
|   - nix eval -f default.nix 'lib' | ||||
|   - nix eval -f default.nix 'modules' | ||||
|   - nix eval -f default.nix 'overlays' | ||||
|  | ||||
| - name: deploy | ||||
|   image: nixpkgs/cachix | ||||
|   commands: | ||||
|   - nix-build ci.nix -A cacheOutputs | cachix push "${CACHIX_CACHE}" | ||||
|  | ||||
| ... | ||||
| @@ -14,8 +14,5 @@ | ||||
|   modules = import ./modules; # NixOS modules | ||||
|   overlays = import ./overlays; # nixpkgs overlays | ||||
|  | ||||
|   example-package = pkgs.callPackage ./pkgs/example-package { }; | ||||
|   # some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { }; | ||||
|   # ... | ||||
| } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -1,10 +0,0 @@ | ||||
| { stdenv }: | ||||
|  | ||||
| stdenv.mkDerivation rec { | ||||
|   name = "example-package-${version}"; | ||||
|   version = "1.0"; | ||||
|   src = ./.; | ||||
|   buildPhase = "echo echo Hello World > example"; | ||||
|   installPhase = "install -Dm755 example $out"; | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user