Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / sp / spip / package.nix
blob9f99a9e438e09c6c389dc5e540f5bd0a4e74228b
2  fetchFromGitHub,
3  fetchurl,
4  lib,
5  makeWrapper,
6  rPackages,
7  rWrapper,
8  stdenv
9 }:
11 let
12   my-r-packages = rWrapper.override{packages = with rPackages; [
13     foreach
14     doParallel
15     randomForest
16   ];};
17   transcriptome-url = "https://kumisystems.dl.sourceforge.net/project/splicing-prediction-pipeline/transcriptome/";
19   transcriptome19 = fetchurl {
20     url = transcriptome-url + "/transcriptome_hg19.RData";
21     sha256 = "sha256-E8UmHoNoySSIde+TRE6bxVP0PrccpKDvIHBGCvWnYOw=";
22   };
24   transcriptome38 = fetchurl {
25     url = transcriptome-url + "/transcriptome_hg38.RData";
26     sha256 = "sha256-mQMMZVN1byXMYjFoRdezmoZtnhUur2CHOP/j/pmw8as=";
27   };
31 stdenv.mkDerivation {
32   pname = "spip";
33   version = "unstable-2023-04-19";
35   src = fetchFromGitHub {
36     owner = "raphaelleman";
37     repo = "SPiP";
38     rev = "cae95fe0ee7a2602630b7a4eacbf7cfa0e1763f0";
39     sha256 = "sha256-/CufUaQYnsdo8Rij/24JmixPgMi7o1CApLxeTneWAVc=";
40   };
42   nativeBuildInputs = [ makeWrapper ];
43   buildInput = [ my-r-packages ];
45   installPhase =''
46     runHook preInstall
48     mkdir -p $out/bin
49     cp SPiPv2.1_main.r $out/
50     cp -r RefFiles $out/
51     ln -s ${transcriptome19} $out/RefFiles/transcriptome_hg19.RData
52     ln -s ${transcriptome38} $out/RefFiles/transcriptome_hg38.RData
53     makeWrapper ${my-r-packages}/bin/Rscript $out/bin/spip \
54       --add-flags "$out/SPiPv2.1_main.r"
56     runHook postInstall
57 '';
59   meta = with lib; {
60     description = "A random forest model for splice prediction in genomics";
61     license     = licenses.mit;
62     homepage    = "https://github.com/raphaelleman/SPiP";
63     maintainers = with maintainers; [ apraga ];
64     platforms = platforms.unix;
65     mainProgram = "spip";
66   };