Skip to content

Commit

Permalink
new sources to fix a package (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro authored Feb 20, 2021
1 parent 7066836 commit 04f1e91
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 13 deletions.
58 changes: 50 additions & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
name: "Validate PR"
on:
pull_request:
push:
branches:
- master
jobs:
tests:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: fmt
run: |
find . -iname '*.nix' | xargs nix run -f ./sources.nix nixpkgs-fmt -c nixpkgs-fmt --check
native:
strategy:
fail-fast: false
matrix:
Expand All @@ -15,8 +25,7 @@ jobs:
config:
- {os: "ubuntu-latest", target: "native"}
- {os: "macos-latest", target: "native"}
- {os: "ubuntu-latest", target: "arm64"}
- {os: "ubuntu-latest", target: "musl"}
name: Native packages (${{ matrix.config.os }}, OCaml ${{ matrix.setup.ocaml-version }})
runs-on: ${{ matrix.config.os }}
env:
NIXPKGS_ALLOW_UNFREE: 1
Expand All @@ -29,11 +38,44 @@ jobs:
with:
name: anmonteiro
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: fmt
run: |
find . -iname '*.nix' | xargs nix run -f ./sources.nix nixpkgs-fmt -c nixpkgs-fmt --check
- name: Build nix packages
run: |
nix run -f ./sources.nix nix-build-uncached -c \
nix-build-uncached ./ci.nix --argstr ocamlVersion ${{ matrix.setup.ocaml-version }} --argstr target ${{ matrix.config.target }} --show-trace --keep-going
nix-build-uncached ./ci.nix \
--argstr ocamlVersion ${{ matrix.setup.ocaml-version }} \
--argstr target ${{ matrix.config.target }} \
--show-trace --keep-going
continue-on-error: ${{ matrix.setup.continue-on-error }}

cross-compilers:
needs: [native]
strategy:
fail-fast: false
matrix:
ocaml-version:
- 4_11
- 4_12
target:
- arm64
- musl
name: ${{matrix.target}} packages (OCaml ${{ matrix.ocaml-version }})
runs-on: ubuntu-latest
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- uses: cachix/cachix-action@v8
with:
name: anmonteiro
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Build nix packages
run: |
nix run -f ./sources.nix nix-build-uncached -c \
nix-build-uncached ./ci.nix \
--argstr ocamlVersion ${{ matrix.ocaml-version }} \
--argstr target ${{ matrix.target }} \
--show-trace --keep-going
4 changes: 2 additions & 2 deletions cockroachdb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ let
in
stdenv.mkDerivation rec {
pname = "cockroach";
version = "20.2.4";
version = "20.2.5";

goPackagePath = "github.com/cockroachdb/cockroach";

src = builtins.fetchurl {
url = "https://binaries.cockroachdb.com/cockroach-v${version}.src.tgz";
sha256 = "0k9v7f5l0yl95qdcn4fman6hmj4n0mvz5crbdd2sxj4abgqf6gms";
sha256 = "181h0ywk6r661fy1z37jbdhxz8hn4q09n795l9063cqndm8gcr7r";
};

NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ "-Wno-error=deprecated-copy" "-Wno-error=redundant-move" "-Wno-error=pessimizing-move" ];
Expand Down
12 changes: 12 additions & 0 deletions cross/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
ocamlPackages_latest = self.ocamlPackages;
opaline = super.buildPackages.opaline;

# https://github.com/NixOS/nixpkgs/pull/113819
tzdata = super.tzdata.overrideAttrs (_: {
preInstall = ''
mv zic.o zic.o.orig
mv zic zic.orig
make $makeFlags cc=cc AR=ar zic
mv zic zic-native
mv zic.o.orig zic.o
mv zic.orig zic
'';
});

ocaml-ng = super.ocaml-ng // oPs // {
ocamlPackages = self.ocamlPackages;
# ocamlPackages_latest = self.ocamlPackages;
Expand Down
6 changes: 3 additions & 3 deletions sources.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ args@{ overlays ? [ (import ./.) ], ... }:

import
(builtins.fetchTarball {
name = "nixos-unstable-2021-02-14";
url = https://github.com/nixos/nixpkgs/archive/6b1057b452c55bb3b463f0d7055bc4ec3fd1f381.tar.gz;
sha256 = "10qfg11g8m0q2k3ibcm0ivjq494gqynshm3smjl1rfn5ifjf5fz8";
name = "nixos-unstable-2021-02-20";
url = https://github.com/nixos/nixpkgs/archive/9816b99e71c3504b0b4c1f8b2e004148460029d4.tar.gz;
sha256 = "1dpz36i3vx0c1wmacrki0wsf30if8xq3bnj71g89rsbxyi87lhcm";
})
(args // { inherit overlays; })

0 comments on commit 04f1e91

Please sign in to comment.