mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
Merge pull request #149404 from Infinisil/remove-scyther
This commit is contained in:
commit
e30a4fa4bd
@ -1,29 +0,0 @@
|
||||
{ stdenv, glibc, flex, bison, cmake
|
||||
, version, src, meta }:
|
||||
stdenv.mkDerivation {
|
||||
pname = "scyther-cli";
|
||||
inherit version;
|
||||
|
||||
inherit src meta;
|
||||
|
||||
nativeBuildInputs = [ cmake flex bison ];
|
||||
buildInputs = [ glibc.static ];
|
||||
|
||||
patchPhase = ''
|
||||
# Since we're not in a git dir, the normal command this project uses to create this file wouldn't work
|
||||
printf "%s\n" "#define TAGVERSION \"${version}\"" > src/version.h
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
(cd src && cmakeConfigurePhase)
|
||||
'';
|
||||
|
||||
dontUseCmakeBuildDir = true;
|
||||
cmakeFlags = [ "-DCMAKE_C_FLAGS=-std=gnu89" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
mv src/scyther-linux "$out/bin/scyther-cli"
|
||||
ln -s "$out/bin/scyther-cli" "$out/bin/scyther-linux"
|
||||
'';
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
{ stdenv, lib, buildEnv, pkgsi686Linux, fetchFromGitHub, python27Packages, graphviz
|
||||
, includeGUI ? true
|
||||
, includeProtocols ? true
|
||||
}:
|
||||
let
|
||||
version = "1.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
sha256 = "0rb4ha5bnjxnwj4f3hciq7kyj96fhw14hqbwl5kr9cdw8q62mx0h";
|
||||
owner = "cascremers";
|
||||
repo = "scyther";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for the automatic verification of security protocols";
|
||||
homepage = "https://www.cs.ox.ac.uk/people/cas.cremers/scyther/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ infinisil ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
cli = pkgsi686Linux.callPackage ./cli.nix {
|
||||
inherit version src meta;
|
||||
};
|
||||
|
||||
gui = stdenv.mkDerivation {
|
||||
pname = "scyther-gui";
|
||||
inherit version;
|
||||
inherit src meta;
|
||||
buildInputs = [
|
||||
python27Packages.wrapPython
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
file=gui/Scyther/Scyther.py
|
||||
|
||||
# By default the scyther binary is looked for in the directory of the python script ($out/gui), but we want to have it look where our cli package is
|
||||
substituteInPlace $file --replace "return getMyDir()" "return \"${cli}/bin\""
|
||||
|
||||
# Removes the Shebang from the file, as this would be wrapped wrongly
|
||||
sed -i -e "1d" $file
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python27Packages.wxPython
|
||||
graphviz
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/gui "$out"/bin
|
||||
cp -r gui/* "$out"/gui
|
||||
ln -s "$out"/gui/scyther-gui.py "$out/bin/scyther-gui"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapPythonProgramsIn "$out/gui" "$out $pythonPath"
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
"$out/gui/scyther.py" "$src/gui/Protocols/Demo/ns3.spdl"
|
||||
'';
|
||||
};
|
||||
in
|
||||
buildEnv {
|
||||
name = "scyther-${version}";
|
||||
inherit meta;
|
||||
paths = [ cli ] ++ lib.optional includeGUI gui;
|
||||
pathsToLink = [ "/bin" ];
|
||||
|
||||
postBuild = ''
|
||||
rm "$out/bin/scyther-linux"
|
||||
'' + lib.optionalString includeProtocols ''
|
||||
mkdir -p "$out/protocols"
|
||||
cp -rv ${src}/protocols/* "$out/protocols"
|
||||
'';
|
||||
}
|
@ -839,6 +839,7 @@ mapAliases ({
|
||||
scaff = throw "scaff is deprecated - replaced by https://gitlab.com/jD91mZM2/inc (not in nixpkgs yet)"; # added 2020-03-01
|
||||
scim = sc-im; # added 2016-01-22
|
||||
scollector = bosun; # added 2018-04-25
|
||||
scyther = throw "scyther has been removed since it currently only supports Python 2, see https://github.com/cascremers/scyther/issues/20"; # added 2021-10-07
|
||||
sdlmame = mame; # added 2019-10-30
|
||||
seeks = throw "seeks has been removed from nixpkgs, as it was unmaintained"; # added 2020-06-21
|
||||
seg3d = throw "seg3d has been removed from nixpkgs (2019-11-10)";
|
||||
|
@ -31681,8 +31681,6 @@ with pkgs;
|
||||
|
||||
plm = callPackage ../applications/science/programming/plm { };
|
||||
|
||||
scyther = callPackage ../applications/science/programming/scyther { };
|
||||
|
||||
### SCIENCE/LOGIC
|
||||
|
||||
abc-verifier = callPackage ../applications/science/logic/abc {};
|
||||
|
Loading…
Reference in New Issue
Block a user