How to Install Islandora on nixOS Latest

Islandora is an open-source digital repository software that specializes in digital asset management, preservation, and discovery. In this tutorial, we will guide you through the process of installing Islandora on the nixOS Latest operating system.

Prerequisites

Before starting the installation process, ensure that your system meets the following requirements:

  • nixOS Latest installed on your system
  • Access to the command-line interface
  • Basic knowledge of the nix package manager

Step 1: Installing Dependencies

First, we need to install some dependencies that are required to run the Islandora application. Open the terminal and run the following command:

sudo nix-env -i apacheSolr drupal8 postgresql12

This command will install the Apache Solr search platform, Drupal 8 content management system, and PostgreSQL 12 database management system.

Step 2: Cloning Islandora

Next, we need to clone the Islandora source code from the GitHub repository. Run the following command to clone the repository:

git clone https://github.com/Islandora/islandora.git

This command will create a new directory named "islandora" and download all the source code files from the Islandora repository.

Step 3: Adding Islandora as a Nix Package

Now, we need to add the Islandora application as a package in the nixOS system. To do this, we will create a new file named "islandora.nix" in the "/etc/nixos/" directory.

Open the terminal and run the following command:

sudo nano /etc/nixos/islandora.nix

This command will open a new file in the nano text editor. Copy and paste the following code into the file:

{ stdenv, makeWrapper, apacheSolr, postgresql, drupal8 }:

let
  islandora = pkgs.lib.importDirectory ./islandora;

in stdenv.mkDerivation {
  name = "islandora";
  buildInputs = with pkgs; [ apacheSolr postgresql drupal8 ];
  src = islandora;
  installPhase = ''
    mkdir -p $out/share/
    cp -R ${islandora}/islandora/drupal $out/share/islandora
    cd $out/share/islandora/drupal
    drush -y si --uri=http://localhost:8000 islandora --db-url=pgsql://postgres@localhost/islandora
    drush -y en islandora_scholar islandora_collection islandora_pdf islandora_book islandora_solr islandora_videojs islandora_solr_metadata
    drush cc all
  '';
  postInstall = ''
    makeWrapper $out/share/islandora/drupal/vendor/bin/phpunit $out/bin/phpunit --add-php-args "-d pdo_pgsql.default_socket=/run/postgresql"
  '';
}

This Nix code will define an Islandora package with Apache Solr, PostgreSQL, and Drupal 8 as dependencies. The package will also include the source code files from the cloned Islandora repository.

Save the file by pressing "Ctrl + X", then "Y", and then "Enter".

Step 4: Installing Islandora

Finally, we can install the Islandora application on our nixOS system. Open the terminal and run the following command:

sudo nix-env -iA nixos.islandora -f /etc/nixos/islandora.nix

This command will download and install the Islandora package from the Nix store. Once the installation is complete, we can start the Islandora application by running the following command:

islandora

This command will start the Apache Solr server and the Drupal 8 website on the default ports.

Conclusion

In this tutorial, we have learned how to install Islandora on the nixOS Latest operating system. With Islandora, we can manage and preserve digital assets such as images, videos, and documents in a secure and scalable way.