Skip to content

Commit

Permalink
Add openssl-ubuntu-legacy package
Browse files Browse the repository at this point in the history
  • Loading branch information
Frankoslaw committed Jun 17, 2023
1 parent dead765 commit 22b0646
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 47 deletions.
4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
modules = import ./modules; # NixOS modules
overlays = import ./overlays; # nixpkgs overlays

example-package = pkgs.callPackage ./pkgs/example-package { };
hello-nur = pkgs.callPackage ./pkgs/hello-nur {};
ani-cli = pkgs.callPackage ./pkgs/ani-cli {};
wasi-sdk = pkgs.callPackage ./pkgs/wasi-sdk {};
openssl-ubuntu-legacy = pkgs.callPackage ./pkgs/openssl-ubuntu-legacy {};
# pwn-adventure3 = pkgs.callPackage ./pkgs/PwnAdventure3 {};
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
# ...
}
14 changes: 9 additions & 5 deletions pkgs/PwnAdventure3/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
stdenv,
fetchzip,
lib,
autoPatchelfHook,
gcc,
glibc
}:

stdenv.mkDerivation rec {
pname = "pwn-adventure3";
version = "3";

src = fetchzip {
# TODO: Add parameters for darwin and version
url = "http://www.pwnadventure.com/PwnAdventure${version}_Linux.zip";
sha256 = "19h5kl3ymn0sgzx742pxy5binqfy86xbf6pxri7m5i7k5swhlzl4";
};
Expand All @@ -16,14 +24,10 @@ stdenv.mkDerivation rec {
stdenv.cc.cc.lib
gcc
glibc
robo3t
];

sourceRoot = ".";

preBuild = ''
addAutoPatchelfSearchPath ${robo3t}/lib/robo3t/lib/
'';
installPhase = ''
mkdir -p $out/
cp -r ./source/* $out/
Expand Down
9 changes: 0 additions & 9 deletions pkgs/example-package/default.nix

This file was deleted.

31 changes: 0 additions & 31 deletions pkgs/hello-nur/default.nix

This file was deleted.

41 changes: 41 additions & 0 deletions pkgs/openssl-ubuntu-legacy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
stdenv,
dpkg,
fetchurl,
autoPatchelfHook
}:

stdenv.mkDerivation rec {
name = "dumb-hello";

src = fetchurl {
urls = [
"http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb"
"http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libcrypto1.0.0-udeb_1.0.2n-1ubuntu5.13_amd64.udeb"
];
hash = "sha256-7RRVVnFHWi20gQSbS2bs03b3mnym1NeKFwL+sDeqVCI=";
};

nativeBuildInputs = [
autoPatchelfHook
];

buildInputs = [
dpkg
];

dontUnpack = true;

buildPhase = ''
source $stdenv/setup
PATH=$dpkg/bin:$PATH
dpkg -x $src unpacked
'';

installPhase = ''
mkdir -p $out/lib $out/share
cp -r unpacked/usr/lib/x86_64-linux-gnu/* $out/lib
cp -r unpacked/usr/share/* $out/share
'';
}
1 change: 1 addition & 0 deletions pkgs/wasi-sdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
autoPatchelfHook,
}:

# TODO: Fix RAYLIB, LLVM-STRIP, AR
llvmPackages.stdenv.mkDerivation rec {
pname = "wasi-sdk";
version = "20";
Expand Down

0 comments on commit 22b0646

Please sign in to comment.