mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-21 08:59:20 +03:00
68 lines
2.7 KiB
Nix
68 lines
2.7 KiB
Nix
![]() |
# This file was generated by swiftpm2nix.
|
||
|
{ lib, fetchgit }: rec {
|
||
|
sources = {
|
||
|
"swift-argument-parser" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-argument-parser";
|
||
|
rev = "d2930e8fcf9c33162b9fcc1d522bc975e2d4179b";
|
||
|
sha256 = "070gip241dgn3d0nxgwxva4vp6kbnf11g01q5yaq6kmflcmz58f2";
|
||
|
};
|
||
|
"swift-cmark" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-cmark.git";
|
||
|
rev = "792c1c3326327515ce9bf64c44196b7f4daab9a6";
|
||
|
sha256 = "0xfchdgls3070z16in8ks69y8fpiajmyk7lmp5h7ym7164isa6bb";
|
||
|
};
|
||
|
"swift-crypto" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-crypto.git";
|
||
|
rev = "9680b7251cd2be22caaed8f1468bd9e8915a62fb";
|
||
|
sha256 = "0h054rq14jyg94aiymmp37vqz60a13dlczp5g09pln724j4ypv92";
|
||
|
};
|
||
|
"swift-docc-plugin" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-docc-plugin";
|
||
|
rev = "3303b164430d9a7055ba484c8ead67a52f7b74f6";
|
||
|
sha256 = "11d6nhi139yzk1lxxrixsbgyj1bnvmh40wj30y725q83nqq49ljh";
|
||
|
};
|
||
|
"swift-docc-symbolkit" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-docc-symbolkit";
|
||
|
rev = "8682202025906dce29a8b04f9263f40ba87b89d8";
|
||
|
sha256 = "14hb2wc09hisf2r2yny17z28z0m58cf4lnqaczad2x2hk4s1iayi";
|
||
|
};
|
||
|
"swift-lmdb" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-lmdb.git";
|
||
|
rev = "6ea45a7ebf6d8f72bd299dfcc3299e284bbb92ee";
|
||
|
sha256 = "1m5y6x2vs1wflcv2c57rx87gh12sy0hkwy5iy9inxmda2mcs8qcb";
|
||
|
};
|
||
|
"swift-markdown" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-markdown.git";
|
||
|
rev = "d6cd065a7e4b6c3fad615dcd39890e095a2f63a2";
|
||
|
sha256 = "09270bfrwlp904cma29hsbhr1p25v8kwgvhcfi7lg2av7aaknd97";
|
||
|
};
|
||
|
"swift-nio" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-nio.git";
|
||
|
rev = "1d425b0851ffa2695d488cce1d68df2539f42500";
|
||
|
sha256 = "04bvay94b34ynmlvgyl9a7f431l3cf8k2zr483spv8mvyh1hxiqn";
|
||
|
};
|
||
|
"swift-nio-ssl" = fetchgit {
|
||
|
url = "https://github.com/apple/swift-nio-ssl.git";
|
||
|
rev = "2e74773972bd6254c41ceeda827f229bccbf1c0f";
|
||
|
sha256 = "1ak4aldilmz0pnfgbwq1x4alr38nfyvx2pz7p2vi2plf82da80g5";
|
||
|
};
|
||
|
};
|
||
|
configure = ''
|
||
|
mkdir -p .build/checkouts
|
||
|
ln -sf ${./Package.resolved} ./Package.resolved
|
||
|
install -m 0600 ${./workspace-state.json} ./.build/workspace-state.json
|
||
|
''
|
||
|
+ lib.concatStrings (lib.mapAttrsToList (name: src: ''
|
||
|
ln -s '${src}' '.build/checkouts/${name}'
|
||
|
'') sources)
|
||
|
+ ''
|
||
|
# Helper that makes a swiftpm dependency mutable by copying the source.
|
||
|
swiftpmMakeMutable() {
|
||
|
local orig="$(readlink .build/checkouts/$1)"
|
||
|
rm .build/checkouts/$1
|
||
|
cp -r "$orig" .build/checkouts/$1
|
||
|
chmod -R u+w .build/checkouts/$1
|
||
|
}
|
||
|
'';
|
||
|
}
|