Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bfed64ea311a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dd4ebbc91fde
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 9, 2020

  1. pijul: 0.12.0 -> 1.0.0-alpha

    dywedir committed Nov 9, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    dywedir Vlad M.
    Copy the full SHA
    2e14001 View commit details

Commits on Nov 11, 2020

  1. Merge pull request #102968 from dywedir/anu

    pijul: 0.12.0 -> 1.0.0-alpha
    dywedir authored Nov 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dd4ebbc View commit details
Showing with 30 additions and 62 deletions.
  1. +30 −50 pkgs/applications/version-management/pijul/default.nix
  2. +0 −12 pkgs/applications/version-management/pijul/thrussh-build-fix.patch
80 changes: 30 additions & 50 deletions pkgs/applications/version-management/pijul/default.nix
Original file line number Diff line number Diff line change
@@ -1,64 +1,44 @@
{ stdenv, fetchurl, rustPlatform, darwin, openssl, libsodium, nettle, clang, libclang, pkgconfig }:

let
# nettle-sys=1.0.1 requires the des-compat.h header, but it was removed in
# nettle 3.5. See https://nest.pijul.com/pijul_org/pijul/discussions/416
# Remove with the next release
nettle_34 = nettle.overrideAttrs (_oldAttrs: rec {
version = "3.4.1";
src = fetchurl {
url = "mirror://gnu/nettle/nettle-${version}.tar.gz";
sha256 = "1bcji95n1iz9p9vsgdgr26v6s7zhpsxfbjjwpqcihpfd6lawyhgr";
};
});
in rustPlatform.buildRustPackage rec {
{ stdenv
, fetchCrate
, rustPlatform
, pkg-config
, clang
, libclang
, libsodium
, openssl
, xxHash
, zstd
, darwin
, gitImportSupport ? true
, libgit2 ? null
}:

rustPlatform.buildRustPackage rec {
pname = "pijul";
version = "0.12.0";
version = "1.0.0-alpha";

src = fetchurl {
url = "https://pijul.org/releases/${pname}-${version}.tar.gz";
sha256 = "1rm787kkh3ya8ix0rjvj7sbrg9armm0rnpkga6gjmsbg5bx20y4q";
src = fetchCrate {
inherit version pname;
sha256 = "0dnw2cxsxb20my81szyqjsmmnkakxawvsk6cnd1fi88k4lr0z2xh";
};

cargoSha256 = "0rf8qmgzgyl718yznbskzafyg963ygibjmqncd93zdandgl9nj5v";

# N.B. The cargo depfile checker expects us to have unpacked the src tarball
# into the standard dirname "source".
cargoDepsHook = ''
ln -s ${pname}-${version} source
'';

# TODO: Delete once pijul fixes upstream:
# https://nest.pijul.com/pijul_org/pijul/discussions/447
postPatch = ''
pushd ../${pname}-${version}-vendor.tar.gz/thrussh/
patch -p1 < ${./thrussh-build-fix.patch}
substituteInPlace .cargo-checksum.json --replace \
9696ed2422a483cd8de48ac241178a0441be6636909c76174c536b8b1cba9d45 \
a199f2bba520d56e11607b77be4dde0cfae576c90badb9fbd39af4784e8120d1
popd
'';

nativeBuildInputs = [ pkgconfig clang ];

postInstall = ''
mkdir -p $out/share/{bash-completion/completions,zsh/site-functions,fish/vendor_completions.d}
$out/bin/pijul generate-completions --bash > $out/share/bash-completion/completions/pijul
$out/bin/pijul generate-completions --zsh > $out/share/zsh/site-functions/_pijul
$out/bin/pijul generate-completions --fish > $out/share/fish/vendor_completions.d/pijul.fish
'';

LIBCLANG_PATH = libclang + "/lib";
cargoSha256 = "130vryqs0g4a0328ivqafdylwqs64g4mp8vgmz6nz4c9l3h9wgcx";

buildInputs = [ openssl libsodium nettle_34 libclang ] ++ stdenv.lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ CoreServices Security ]);
cargoBuildFlags = stdenv.lib.optional gitImportSupport "--features=git";
LIBCLANG_PATH = "${libclang}/lib";

doCheck = false;
nativeBuildInputs = [ pkg-config clang ];
buildInputs = [ openssl libclang libsodium xxHash zstd ]
++ (stdenv.lib.optionals gitImportSupport [ libgit2 ])
++ (stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreServices Security SystemConfiguration
]));

meta = with stdenv.lib; {
description = "A distributed version control system";
homepage = "https://pijul.org";
license = with licenses; [ gpl2Plus ];
maintainers = [ maintainers.gal_bolle ];
maintainers = with maintainers; [ gal_bolle dywedir ];
};
}
12 changes: 0 additions & 12 deletions pkgs/applications/version-management/pijul/thrussh-build-fix.patch

This file was deleted.