mirror of
https://github.com/tweag/distributed-closure.git
synced 2024-11-22 03:06:47 +03:00
Use the new Buildkite setup and build with Nix
This commit is contained in:
parent
01f709852b
commit
0adf4830b4
@ -1,6 +1,5 @@
|
||||
steps:
|
||||
- label: "Run tests"
|
||||
- label: Build and test
|
||||
command: |
|
||||
. /var/lib/buildkite-agent/.nix-profile/etc/profile.d/nix.sh
|
||||
nix-shell --run 'stack build --pedantic --test'
|
||||
nix-build -A distributed-closure --no-out-link
|
||||
timeout: 10
|
||||
|
29
default.nix
Normal file
29
default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ pkgs ? (import ./nix/nixpkgs) }:
|
||||
|
||||
let
|
||||
compiler = "ghc865";
|
||||
source = pkgs.lib.sourceByRegex ./. [
|
||||
"^.*\.md$"
|
||||
"^distributed-closure\.cabal$"
|
||||
"^examples.*$"
|
||||
"^src.*$"
|
||||
"^tests.*$"
|
||||
];
|
||||
haskellPackages = pkgs.haskell.packages.${compiler}.override {
|
||||
overrides = distributedClosureOverlay;
|
||||
};
|
||||
distributedClosureOverlay = self: super: {
|
||||
"distributed-closure" = super.callCabal2nix "distributed-closure" source { };
|
||||
};
|
||||
in {
|
||||
distributed-closure = haskellPackages.distributed-closure;
|
||||
shell = haskellPackages.shellFor {
|
||||
packages = ps: [
|
||||
ps.distributed-closure
|
||||
];
|
||||
buildInputs = [
|
||||
haskellPackages.cabal-install
|
||||
haskellPackages.ghcid
|
||||
];
|
||||
};
|
||||
}
|
@ -4,7 +4,7 @@ synopsis: Serializable closures for distributed programming.
|
||||
description: See README.
|
||||
homepage: https://github.com/tweag/distributed-closure
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
license-file: LICENSE.md
|
||||
author: Mathieu Boespflug
|
||||
maintainer: m@tweag.io
|
||||
copyright: © Tweag I/O Limited
|
||||
|
9
nix/nixpkgs/default.nix
Normal file
9
nix/nixpkgs/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
let
|
||||
rev = "19.09";
|
||||
sha256 = "0mhqhq21y5vrr1f30qd2bvydv4bbbslvyzclhw0kdxmkgg3z4c92";
|
||||
nixpkgs = builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
pkgs = import nixpkgs { config.allowUnfree = true; };
|
||||
in pkgs
|
@ -1 +0,0 @@
|
||||
import (fetchTarball "https://github.com/nixos/nixpkgs/archive/b41e2cf0c47e82fb851bc21e97551fc46186747b.tar.gz")
|
12
shell.nix
12
shell.nix
@ -1,11 +1,3 @@
|
||||
{pkgs ? import ./nixpkgs.nix {}}:
|
||||
{ pkgs ? (import ./nix/nixpkgs) }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
mkShell {
|
||||
LANG="C.UTF-8";
|
||||
buildInputs = [
|
||||
ghc
|
||||
stack
|
||||
];
|
||||
}
|
||||
(import ./default.nix { inherit pkgs; }).shell
|
||||
|
@ -1,7 +0,0 @@
|
||||
resolver: lts-14.19
|
||||
packages:
|
||||
- '.'
|
||||
|
||||
system-ghc: true
|
||||
nix:
|
||||
enable: false
|
@ -1,12 +0,0 @@
|
||||
# This file was autogenerated by Stack.
|
||||
# You should not edit this file by hand.
|
||||
# For more information, please see the documentation at:
|
||||
# https://docs.haskellstack.org/en/stable/lock_files
|
||||
|
||||
packages: []
|
||||
snapshots:
|
||||
- completed:
|
||||
size: 524155
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/19.yaml
|
||||
sha256: 9f79f6494473c9b46911364b94c4b5ef19ca8d35ebf62e46697cf651f198ee19
|
||||
original: lts-14.19
|
Loading…
Reference in New Issue
Block a user