This commit is contained in:
2016-10-22 17:19:31 +02:00
parent d965ea4aae
commit 41922081c4
2 changed files with 32 additions and 38 deletions

View File

@@ -1,20 +1,24 @@
with import <nixpkgs> {}; with import <nixpkgs> {};
let
versionName = "2016-10-22-v1";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "blog-gallery-${version}"; name = "blog-gallery-${version}";
#version = "MASTER"; #version = "MASTER";
# src = fetchTarball { # src = fetchTarball {
# url = "https://gogs.prunetwork.fr/jpierre03/gallery/archive/master.tar.gz"; # url = "https://gogs.prunetwork.fr/jpierre03/gallery/archive/master.tar.gz";
#}; #};
version = "2016-10-22-v1"; version = versionName;
src = fetchurl { src = fetchurl {
url = "https://gogs.prunetwork.fr/jpierre03/gallery/archive/${version}.tar.gz"; url = "https://gogs.prunetwork.fr/jpierre03/gallery/archive/${version}.tar.gz";
sha256 = "0i44mp1w2p8v3yssa4c8xz59ga74dcxq96lkznyxr8np6hwdiyx1"; sha256 = "0i44mp1w2p8v3yssa4c8xz59ga74dcxq96lkznyxr8np6hwdiyx1";
}; };
buildInputs = [ jekyll ]; buildInputs = [ jekyll ];
buildPhase = "jekyll build"; buildPhase = "jekyll build";
installPhase = "cp -R _site \$out"; installPhase = "cp -R _site \$out";
} }

View File

@@ -1,33 +1,23 @@
{ nixpkgs ? <nixpkgs> {
#, systems ? [ "i686-linux" "x86_64-linux" "x86_64-darwin" ] supportedSystems ? ["i686-linux" "x86_64-linux"]
, systems ? [ "x86_64-linux" ]
}: }:
let with import ./blog-gallery.nix;
pkgs = import nixpkgs {}; with (import <nixpkgs/pkgs/top-level/release-lib.nix> { inherit supportedSystems; });
version = "2016-10-22-v1"; {
jobset = import ./blog-gallery.nix { # Simply assign a derivation to an attribute to have it built.
inherit pkgs; hello_world_1 = pkgs_x86_64_linux.hello;
system = builtins.currentSystem;
};
in
rec {
inherit (jobset) tarball;
package = pkgs.lib.genAttrs systems (system: # 'hydraJob' strips all non-essential attributes.
(import ./blog-gallery.nix { hello_world_2 = pkgs.lib.hydraJob pkgs_x86_64_linux.hello;
pkgs = import nixpkgs { inherit system; };
inherit system;
}).package
);
release = pkgs.releaseTools.aggregate { blog_gallery;
name = "perso-${version}";
constituents = [ } // mapTestOn {
tarball
] # Fancy shortcut to generate one attribute per supported platform.
++ map (system: builtins.getAttr system package) systems; hello = supportedSystems;
};
} }