diff options
author | Stéphan Kochen <git@stephank.nl> | 2022-11-15 13:05:58 +0100 |
---|---|---|
committer | Stéphan Kochen <git@stephank.nl> | 2022-11-15 14:24:25 +0100 |
commit | 449e2f1b017b232118ceb85606fec294bae5b983 (patch) | |
tree | eb19dba7b773c7eca4eb308313818d240e684904 /pkgs/development/compilers/swift/swift-driver | |
parent | 0e08b082b894e987e89acb32b38f68f32f65c3d0 (diff) |
swift: track version in a central sources.nix
Diffstat (limited to 'pkgs/development/compilers/swift/swift-driver')
-rw-r--r-- | pkgs/development/compilers/swift/swift-driver/default.nix | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/pkgs/development/compilers/swift/swift-driver/default.nix b/pkgs/development/compilers/swift/swift-driver/default.nix index b09cc7d8fbda1..33f2c045983c7 100644 --- a/pkgs/development/compilers/swift/swift-driver/default.nix +++ b/pkgs/development/compilers/swift/swift-driver/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , callPackage -, fetchFromGitHub , fetchpatch , swift , swiftpm @@ -12,8 +11,8 @@ , substituteAll }: let - # Generated by swiftpm2nix. - generated = callPackage ./generated { }; + sources = callPackage ../sources.nix { }; + generated = callPackage ./generated { }; # Generated by swiftpm2nix. # On Darwin, we only want ncurses in the linker search path, because headers # are part of libsystem. Adding its headers to the search path causes strange @@ -21,17 +20,11 @@ let # TODO: Find a better way to prevent this conflict. ncursesInput = if stdenv.isDarwin then ncurses.out else ncurses; in -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "swift-driver"; - # Releases are made as part of the Swift toolchain, so versions should match. - version = "5.7"; - src = fetchFromGitHub { - owner = "apple"; - repo = "swift-driver"; - rev = "swift-${version}-RELEASE"; - hash = "sha256-sk7XWXYR1MGPEeVxA6eA/vxhN6Gq16iD1RHpVstL3zE="; - }; + inherit (sources) version; + src = sources.swift-driver; nativeBuildInputs = [ swift swiftpm ]; buildInputs = [ |