40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
# Serene Programming Language
|
|
#
|
|
# Copyright (c) 2019-2023 Sameer Rahmani <lxsameer@gnu.org>
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, version 2.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
{
|
|
stdenv,
|
|
fetchgit,
|
|
url ? "https://github.com/llvm/llvm-project.git",
|
|
hash ? "sha256-8MEDLLhocshmxoEBRSKlJ/GzJ8nfuzQ8qn0X/vLA+ag=",
|
|
version ? "17.0.6",
|
|
ref ? "refs/tags/llvmorg-${version}"
|
|
}:
|
|
stdenv.mkDerivation rec{
|
|
pname = "llvm_source";
|
|
inherit version;
|
|
|
|
src = fetchgit {
|
|
inherit url hash;
|
|
rev = ref;
|
|
};
|
|
unpackPhase = "true";
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
installPhase = ''
|
|
mkdir -p "$out"
|
|
cp -rv "$src"/* "$out/"
|
|
'';
|
|
}
|